[CSS21] Remarks to '!important' rules

The '!important' rule example [1] doesn't seem to be chosen well, CMIIW: At
first, the assertion 'However, the third rule in the user's style sheet is
not "!important" and will therefore lose to the second rule in the author's
style sheet [...]' also applies to the third rule in the author's style sheet
(as defined by the cascading order [2]), though it might not result in the
value the UA will use.

Second, I think the given example generally ain't that elegant (in this
simple case) because it uses redundant declarations (related to the 'font-size'
property); why should an author define

    p { font: 12pt sans-serif !important }
    p { font-size: 24pt }

when he could simply use

    p { font: xpt sans-serif !important }

where x is either 12 or 24?

-- As another issue, is it intended to give examples using '!important' as
well as '! important' on the entire page [2]? I perceive this as
'inconsistent' since both expressions are frequently used there (without any noticeable
differentiation), and I claim there will be some people irritated by these
examples. It might be better to use only one form consequently.


Best regards,
 Jens.


[1] http://www.w3.org/TR/2003/WD-CSS21-20030915/cascade.html#important-rules
[2] http://www.w3.org/TR/2003/WD-CSS21-20030915/cascade.html#cascading-order
[2] http://www.w3.org/TR/2003/WD-CSS21-20030915/cascade.html


-- 
Jens Meiert
Interface Architect

http://meiert.com/

Received on Monday, 22 December 2003 05:23:44 UTC