Open
Bug 717826
Opened 14 years ago
Updated 3 years ago
implement @important rule to reduce need for redundant !important
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
NEW
People
(Reporter: mrmazda, Unassigned)
Details
[As suggested by www-style mailing list thread beginning at: http://lists.w3.org/Archives/Public/www-style/2012Jan/0182.html started by Marat Tanalin]
As it is now, user stylesheet rules that omit !important are all but worthless. This proposal should not be limited to user stylesheets though.
It would be much more usable to have at-rule of the same name to prevent redundant multiple "!important" word duplication.
For example, currently we write:
#statusbar-display {
left: 0 !important;
right: auto !important;
}
#statusbar-display .statuspanel-label {
border-left-style: none !important;
border-right-style: solid !important;
}
Instead we could wrap the rules to one @important rule, thus avoiding repeating "!important" multiple times:
@important {
#statusbar-display {
left: 0;
right: auto;
}
#statusbar-display .statuspanel-label {
border-left-style: none;
border-right-style: solid;
}
}
Comment 1•14 years ago
|
||
Thanks, Felix.
In addition: since the feature is nonstandard yet, it probably should be -moz-prefixed:
@-moz-important {
...
}
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•