Opened 15 years ago

Closed 9 years ago

#11544 closed Cleanup/optimization (fixed)

adjust admin css to not depend upon the !important declaration.

Reported by: kez.knight@… Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords: css admin
Cc: robinchew@…, cmawebsite@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

If I take a copy of the admin templates and modify base_site to include my own CSS in the block extrastyle, the existing administration css will attempt to overwrite my changes (even those I declare as !important) when loading certain views. For example, the loading of changelists.css will alter my rules as the change_list template also adds to extrastyle, and does so after mine are injected. I imagine that I could alter where I inject CSS to use the extrahead block instead of extrastyle, but it doesn't seem too logical to do so.

Mostly, I'm finding it nigh on impossible to move the filters menu to the left of a changelist, as the changelists.css says to add a margin-right with !important. I can't counteract this, as my stylesheet (complete with !important) is included beforehand, thus is superceded.

I propose rejigging the CSS to not be dependent upon !important (maybe it can be got around by using even finer grained specificity?) where possible so that we might customise the administration without having to resort to butchering the existing admin templates (and making future merges potentially a pain), which serve their purpose very well.

Change History (11)

comment:1 by Alex Gaynor, 15 years ago

milestone: 1.0.3

Not a blocker for 1.0.3.

comment:2 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Julien Phalip, 14 years ago

Severity: Normal
Type: Cleanup/optimization

comment:4 by Julien Phalip, 14 years ago

UI/UX: set

comment:5 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 by Aymeric Augustin, 13 years ago

UI/UX: set

Revert accidental batch modification.

comment:8 by Robin, 11 years ago

Cc: robinchew@… added

comment:9 by Collin Anderson, 10 years ago

Cc: cmawebsite@… added

comment:10 by elky, 9 years ago

Has patch: set

comment:11 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In e23e7b2:

Fixed #11544 -- Removed !important rules in contrib.admin styles.

Note: See TracTickets for help on using tickets.
Back to Top