W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [CSS21][css3-page] What happens to !important inside @page rules?

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Wed, 07 Dec 2011 01:25:31 +0100
Message-ID: <4EDEB27B.60506@kozea.fr>
To: www-style@w3.org
Le 06/12/2011 23:06, L. David Baron a écrit :
> http://www.w3.org/TR/CSS21/page.html#page-box  and
> http://dev.w3.org/csswg/css3-page/#syntax-page-selector  both say
> that declarations are allowed inside of @page rules.  This implies
> that '!important' is allowed, since it's part of the syntax for
> declarations.  However, neither specification says what to do with
> declarations marked '!important'.  Should they gain additional
> priority, and if so, over what?  Or should '!important' instead be a
> parse error?
>
> -David

Hi,

The "Cascading in the page context" section defines a specificity for 
page selectors, so I just assumed that the same cascade rules as for 
normal style rule applied. That is (6.4 of CSS 2.1):

1. Sort by origin and importance:
     user agent declarations
     user normal declarations
     author normal declarations
     author !important declarations
     user !important declarations
2. Sort same origin-importance by specificity
3. Sort same origin-importance-specificity by source order

I think that !important is well defined here.

Regards,
-- 
Simon Sapin
Received on Wednesday, 7 December 2011 00:26:05 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT