- From: David Hyatt <hyatt@apple.com>
- Date: Tue, 20 Mar 2012 12:35:55 -0500
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
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. dave (hyatt@apple.com)
Received on Tuesday, 20 March 2012 17:36:24 UTC