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

Re: [css3-regions] @region and specificity

From: David Hyatt <hyatt@apple.com>
Date: Tue, 20 Mar 2012 12:35:55 -0500
Cc: www-style@w3.org
Message-id: <DA45F3A9-68AB-4863-B12B-67E509C0A592@apple.com>
To: fantasai <fantasai.lists@inkedblade.net>
On Mar 19, 2012, at 7:45 PM, fantasai wrote:

> On 01/26/2012 05:28 PM, Vincent Hardy wrote:
>> Hello,
>> Christoph has proposed an alternate syntax:
>>> h1:region(first) { color: purple; }
>>> h1 { color: blue; }
>> I tend to agree with Alex. I think regions decouple the content from their layout containers so that, typically, we will have
>> a different chain of containers apply depending on the orientation, the device width/height or other factors like this.
>> @fantasai: is what Christoph proposed what you had in mind?
> I think what I had in mind was to use pseudo-elements, like this:
>  .first::region h1 { color: purple; }
> This way we only have one possible track through the tree; with
> a functional notation you can easily branch
>  section.foo h1:region(nav .first) em { color: purple; }
> I can't quite figure out what this would mean, actually...
> But if we use :region() notation it has to mean something!

I would strongly prefer we use pseudo-classes here. I don't get why we would want to use pseudo-elements. We're not talking about a unique object as we are with other pseudo-elements. We're just talking about how an element itself looks in a particular region. In the example above the portion of <h1> that is in a region is still the <h1>, so I think a pseudo-class is far more appropriate.

Received on Tuesday, 20 March 2012 17:36:24 UTC

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