- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sat, 15 Jun 2013 07:31:35 +0200
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Alan Stearns <stearns@adobe.com>, W3C WWW Style <www-style@w3.org>
On Sat, Jun 15, 2013 at 12:13 AM, Brad Kemper <brad.kemper@gmail.com> wrote: > On Jun 14, 2013, at 2:51 PM, Alan Stearns <stearns@adobe.com> wrote: >> That's my point. I don't think that the change to ::fragment lets us use >> future grouping solutions. All of the grouping examples I've seen (and the >> Hierarchies proposal) split similar selectors and create a group out of >> the left side of the split. So if you have the current region styling >> syntax: >> >> <region-selector>::region(<content-selector-A>) {} >> <region-selector>::region(<content-selector-B>) {} >> >> >> Then you could use a left-side grouping mechanism to do what we want, >> which is define a set of region styles for a particular region: >> >> Group<region-selector> >> { >> ::region(<content-selector-A>) {} >> ::region(<content-selector-B>) {} >> } > > That would likely select regions that were descendants of the <region-selector>. > > It might be better than the other pseudo-element option, but it still looks pretty bad to me. Instead of just writing something like this: > > @region #myregion { > p {} > img {} > h3 {} > h4 {} > } > > ...which is clean and clear, I have to write something that is still much more cumbersome, and less readable: > > group #myregion { > ::scope::region(p) {} > ::scope::region(img) {} > ::scope::region(h3) {} > ::scope::region(h4) {} > } It would be more like: #myregion { &::region(p) {} &::region(img) {} &::region(h3) {} &::region(h4) {} } But still, I get your point. Hmm. The whole reason I took Shadow DOM down the pseudo-element route was to keep the distribution selector from being a "normal selector", because it's really not - there's some tree-jumping going on. But using an at-rule to break up the selectors accomplishes the same thing, and looks like it might indeed be easier from an authoring perspective, and better for nesting purposes. Okay, I guess I'm not opposed to switching back to an at-rule. ~TJ
Received on Saturday, 15 June 2013 05:32:21 UTC