admindocs: model_index.html table missing full width
Noticed during an admindocs review that we're missing full width on the <table>, see screenshot (white gray background does not extend to the edge.)
Interestingly, we have the needed selector in responsive mode, so my suggestion is to just hoist the selector, something like:
-
diff --git a/django/contrib/admin/static/admin/css/base.css b/django/contrib/admin/static/admin/css/base.css
index 8a526f5c73..0476eb9ed6 100644
|
a
|
b
|
a.deletelink:hover {
|
| 1383 | 1383 | .actions .button:hover { |
| 1384 | 1384 | border-color: var(--body-quiet-color); |
| 1385 | 1385 | } |
| | 1386 | |
| | 1387 | /* DOCS */ |
| | 1388 | |
| | 1389 | .module table.xfull { |
| | 1390 | width: 100%; |
| | 1391 | } |
-
diff --git a/django/contrib/admin/static/admin/css/responsive.css b/django/contrib/admin/static/admin/css/responsive.css
index d97601e648..b3bdf38dc5 100644
|
a
|
b
|
button {
|
| 370 | 370 | |
| 371 | 371 | /* Docs */ |
| 372 | 372 | |
| 373 | | .module table.xfull { |
| 374 | | width: 100%; |
| 375 | | } |
| 376 | | |
| 377 | 373 | pre.literal-block { |
| 378 | 374 | overflow: auto; |
| 379 | 375 | } |
Needs verification and also maybe some thought around whether we want some screenshot test cases for contrib.admindocs?
Change History
(10)
| Easy pickings: |
set
|
| Triage Stage: |
Unreviewed → Accepted
|
| Type: |
Cleanup/optimization → Bug
|
| Summary: |
model_index.html table missing full width → admindocs: model_index.html table missing full width
|
| Owner: |
changed from Django Sprints to Vaibhav Pant
|
| Needs tests: |
unset
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
Reproduced on main. At viewport widths of 1024px and below the table spans the full width, but from 1025px up it shrinks to fit its content, just like Jacob says. Moving the rule to base.css as suggested looks right.