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

On Tue, Dec 6, 2011 at 2:06 PM, L. David Baron <dbaron@dbaron.org> wrote:
> 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?

I believe they should gain priority.  @page rules are cascaded
together descriptor-wise rather than atomically, so it potentially
makes sense to have an !important descriptor in one rule overriding an
otherwise-more-specific descriptor in another rule when they both
apply to the same page.  (For example, a named-page rule defining
something, and a :left rule overriding it with !important.)

~TJ

Received on Tuesday, 6 December 2011 22:16:02 UTC