Open mstensho opened 6 months ago
What should come first - child margin rules, or the CSS property / descriptor declaration block (CSSStyleDeclaration)? I imagine that dumping the declaration block first is a slightly better choice. This may be how authors typically write it, as well, since the properties are inherited by the margin contexts, so that putting them first makes it more readable.
And is it fine to simply include the page-specific descriptors (size
and page-orientation
) in CSSStyleDeclaration, just as if they were regular properties in a way?
The order that I suggested above (declarations, then child rules) also agrees with how CSSStyleRule
is serialized.
https://drafts.csswg.org/cssom/#css-rules defines how various rule types are serialized, but the entry for CSSPageRule just says "Need to define how CSSPageRule is serialized.".