[cssom][css3-page] OM for margin at-rules (was: Re: Agenda request: css3-page issues)

Le 24/02/2013 18:24, Daniel Glazman a écrit :
> Sorry, I have an extra one: what's the OM for the new @page
> rule with the extra nested at-rules? What is the OM for the
> margin boxes at-rules? Without that, the whole thing is not
> editable easily and requires textual manipulation of stylesheets.

(Moving to www-style.)

We had an issue about this on Tracker for css3-page, but I think it 
really belongs in CSSOM which already defines a CSSPageRule interface. I 
move the bug to the CSSOM bugzilla component:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20983

As described there, my suggestion is to add a .cssRules attribute (that 
would be similar to that of CSSMediaRule) in addition to the existing 
.style attribute that contains declarations.

This API does not preserve the relative position of margin at-rules 
compared to declarations, but that’s ok IMO since that position is not 
significant. Serialization *should* write at-rules after declarations to 
mitigate broken parsers in older UAs.

-- 
Simon Sapin

Received on Sunday, 24 February 2013 18:21:56 UTC