#35804: Unused CSS in admin's forms.css -------------------------------------+------------------------------------- Reporter: Baptiste Mispelon | Type: | Cleanup/optimization Status: new | Component: | contrib.admin Version: 5.0 | Severity: Normal Keywords: css | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+------------------------------------- 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. -- Ticket URL: <https://code.djangoproject.com/ticket/35804> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/010701923956e1aa-0c1cd437-fad5-469d-a1b9-3216b5d1d7b8-000000%40eu-central-1.amazonses.com.