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

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

From: Alan Stearns <stearns@adobe.com>
Date: Thu, 23 May 2013 17:24:35 -0700
To: Bert Bos <bert@w3.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CDC3FCB6.2ABF5%stearns@adobe.com>
On 5/22/13 12:39 PM, "Bert Bos" <bert@w3.org> wrote:

>On Tuesday 14 May 2013 02:55:08 Alan Stearns wrote:
>
>> 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:
>
>Note that the region itself is a pseudo-element, so if we want to put
>something after it, we'll have to change the rules in the selectors
>specification. E.g., the following are currently not allowed:
>
>    ::column(2)::region(P)
>    ::slot(c)::region(H2)
>    ::fragment(4)::region(OL)

If we wanted to use the same syntax for all of the fragment containers,
then we might want to use the term 'fragment' rather than 'region'.

>
>The model behind this syntax is also a bit difficult to explain. We're
>trying to style the part of an element P that falls in the second
>column. We already have 'P::first-line' to select the part of the P that
>is on the first line, so 'P::region(column(2))' would be more logical to
>select the part of the P that is in the second column.
>
>Here are a few alternatives I have tried (see
>http://dev.w3.org/csswg/css3-layout/#select-after-pseudo)

The main difference between ::first-line and region styling is that the
former has a single selector and the latter combines two selectors. It
made sense to me to put the fragment container selector first, but it
could be reversed I suppose. So this syntax from the current draft:

<region-selector>::region(<content-selector>) {}

Would become:

<content-selector>::region(<region-selector>) {}

Or

<content-selector>::fragment(<region-selector>) {}

>5) Another possibility, suggested by David Baron in css3-overflow, is to
>not try to invent a syntax at all, but change the inheritance rules a
>bit and limit ourselves to what can be done with that.

Note that the overflow draft has both the inheritance modification you
mention [1] *and* a version of region styling [2].

Thanks,

Alan

[1] http://dev.w3.org/csswg/css-overflow/#style-of-fragments
[2] http://dev.w3.org/csswg/css-overflow/#style-in-fragments
Received on Friday, 24 May 2013 00:25:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:30 UTC