[css-regions] Changed @region rule to ::region() pseudo-element

Hey all,

Following the discussion in the earlier thread [1] about the similarities
between region styling and the ::distributed() pseudo-element, I have
changed the @region rule to a ::region() functional pseudo-element. Now if
you want to use region styling to set the color of a fragment of an
element with 'class=bar' that displays inside a CSS Region with 'id=foo'
you can use:

#foo::region(.bar) {
  color: red;
}

I've removed the CSSOM section on the CSSRegionStyleRule interface.

This addresses issue 16859 [2] which urged us to reconsider using a
pseudo-element for region styling, by reconsidering and actually using a
pseudo-element for region styling.

This addresses issue 15734 [3] by defining the specificity of the
::region() pseudo-element in the same way that ::distributed() will be
specified. This makes it a bit easier for region styling to 'win' in the
cascade.

And I've closed issue 15713 [4] as the region styling section now makes
the interaction between region styling and the content fragments much more
clear. Clarifications on how region styling interacts with an element's
computed style have been part of the CSSOM section for a while.

Please take a look at the revised section [5]. Any suggestions for
improvements are welcome.

Thanks,

Alan

[1] http://lists.w3.org/Archives/Public/www-style/2013Apr/0410.html
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=16859
[3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15734
[4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15713
[5] http://dev.w3.org/csswg/css-regions/#the-region-pseudo-element

Received on Tuesday, 14 May 2013 00:55:34 UTC