Opened 7 weeks ago
Closed 6 weeks ago
#35804 closed Cleanup/optimization (fixed)
Unused CSS in admin's forms.css
Reported by: | Baptiste Mispelon | Owned by: | Aditya Chaudhary |
---|---|---|---|
Component: | contrib.admin | Version: | 5.0 |
Severity: | Normal | Keywords: | css |
Cc: | Mario Munoz | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Working on #35799 with Mario Munoz, we found that forms.css
contains rules for ul.tools
but no such element exists in the HTML.
Digging into the git history, we found that the CSS rules were introduced in 2008 with a19ed8aea395e8e07164ff7d85bd7dff2f24edca (both in tabular.html
and stacked.html
), but even back then the template code for the ul.tools
was commented out: https://github.com/django/django/blob/a19ed8aea395e8e07164ff7d85bd7dff2f24edca/django/contrib/admin/templates/admin/edit_inline/tabular.html#L60-L62
The commented out HTML code was then removed two years later with https://github.com/django/django/commit/c14937cf7a1e8c25702e89485cc2dd33aa0d3a16#diff-a30e8306c1101c2881c43ab5c18d44aa25281f170b2e7b7d186edff2512ca179L23-L25
That means that any CSS rule involving ul.tools
can be safely removed at this point.
Change History (5)
comment:1 by , 7 weeks ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 7 weeks ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 6 weeks ago
Owner: | changed from | to
---|
comment:4 by , 6 weeks ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Clean, clean, clean :-)