W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [cssom][css3-page] OM for margin at-rules

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Mon, 25 Feb 2013 10:50:32 +0100
Message-ID: <512B33E8.8070307@kozea.fr>
To: www-style@w3.org
Le 25/02/2013 10:16, Daniel Glazman a écrit :
> On 25/02/13 09:37, Simon Sapin wrote:
>
>> If the solution (separate cssRules and style attributes) sound good to
>> you, I could propose a patch if that help.
>
> I think it would be better to make CSSPageRule inherit from
> CSSGroupingRule:
>
>     http://dev.w3.org/csswg/css3-conditional/#the-cssgroupingrule-interface

Makes sense.


>> Not preserving the relative order of inner at-rules with respect to
>> declarations is okay for @page, but will it be for any future situation
>> where we mix at-rules and declarations? Or should we have a single list
>> of mixed at-rules and declarations?
>
> That's an excellent question. I suggest having everything in the OM to
> have an unordered list of rules in @page even if the L3 prose makes
> some restrictions about it.

CSSRuleList can be ordered, that’s not a problem. The point is about 
having two separate lists or a single list of mixed types.

For example, this rule:

   @page {
     size: A3;
     @top-center { content: "Foo" }
     margin: 4cm;
   }

if serialized from an OM with two separate lists, would look like:

   @page {
     size: A3;
     margin: 4cm;
     @top-center { content: "Foo" }
   }

because the information that the at-rule was in-between two declarations 
is not preserved.

-- 
Simon Sapin
Received on Monday, 25 February 2013 09:50:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT