W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [css3-regions] can ::before/::after become a CSS Region?

From: Alan Stearns <stearns@adobe.com>
Date: Wed, 7 Nov 2012 04:35:59 -0800
To: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
CC: WWW Style <www-style@w3.org>
Message-ID: <CCBF91B9.16736%stearns@adobe.com>
On 11/6/12 8:02 PM, "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com> wrote:

>Thanks! That would make it a lot clearer. I am going to be a bit more
>picky however..
>(12/11/07 11:29), Alan Stearns wrote:
>> Yes, the spec should say something about this. There's some text in
>> css4-pseudo [1] that's meant to describe this change:
>> ---
>> A CSS rule using ::before or ::after creates a pseudo-element
>> only if the computed values of the Œcontent¹ property
>> and the Œflow-from¹ property [CSS3-REGIONS] are not both Œnone¹.
>> ---
>> Block container pseudo-elements where the value of ¹flow-from'
>> computes to an <ident> and the value of Œcontent¹ computes to
>> Œnone¹ are generated as CSS Regions, which is an update to the
>> behavior described in [CSS21].
>> ---
>These two sentences give me two different results for a case like:
>  span::before { display: inline; flow-from: test; counter-reset: x 10;
>} span::after { content: counter(x); }
>The former suggests "10" and the latter suggests "0".

Yes. Please take the sentence in css4-pseudo as incomplete. It should have
a clause about needing to be a block container for flow-from to be
relevant. Since the ::before pseudo-element does not become a CSS Region
in this case it is not generated and the result should be "0".

>Also, what should
>happen for a case like
>  span::before { display: block; flow-from: test; flow-into: test;
>counter-reset: x 10; } span::after { content: counter(x); }
>Again the former suggests "10" and I can't really tell what the latter
>is suggesting.

(I changed display to block based on your correction)

In this case, flow-into is ignored as it does not apply to ::before
pseudo-elements, so there is not a circular dependency. So the result
should be "10".



(by the way, I very much appreciate your detailed read of CSS Regions in
the separate long post. I am going to be mostly away from email for the
next two days, so I'm unfortunately not going to be able to respond to it
until Friday this week)

Received on Wednesday, 7 November 2012 12:36:38 UTC

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