Re: [cssom][css-page] Fixes for properly exposing @page in CSSOM

Le 21/08/2013 09:40, Simon Pieters a écrit :
> Hi,
>
> I have fixed bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=22500 and
> would like review of my proposed changes:
>
> https://dvcs.w3.org/hg/csswg/rev/048b4760e33e
>
> commit message:
>
> Expose the margin at-rules in @page as CSSMarginRule, uses type constant
> 9. Use a new interface for the declarations in @page and @top-left. Move
> the bulk of CSSStyleDeclaration to a new interface CSSDeclaration, and let
> CSSStyleDeclaration, CSSPageDeclaration and CSSMarginDeclaration inherit
>   from it.
>
> Constant 9 was unused according to wiki.csswg.org/spec/cssom-constants
>
> See http://dev.w3.org/csswg/css-page/ for more context and examples.

I disagree with CSSPageRule.style and CSSMarginRule.style having a 
different type from CSSStyleRule.style. Some properties "do not apply" 
to the page context or margin context just like the 'text-align' 
property does not apply to inline elements, that does not affect the OM.

@page and margin rules, like keyframe rules, contains "real" CSS 
properties and are much closer to style rules than eg. @font-face which 
contains descriptors that sometimes happen to have the same name as a 
property.

The 'size' property is a bit odd in that it never applies to elements, 
but as currently defined it is a property and thus should appear in 
CSSStyleDeclaration.

-- 
Simon Sapin

Received on Wednesday, 21 August 2013 10:55:44 UTC