Re: [css-regions] ::region() or ::fragment() pseudo-element

On Sat, Jun 15, 2013 at 10:12 AM, Fran├žois REMY
<francois.remy.dev@outlook.com> wrote:
> PS: Just an idea I had now for a more beautiful style of selector grouping
> where there are more than one sub-selector: using a second bracket-paired
> group to store sub selectors. Something like:
>
>    figure { /* root properties */ } {
>        img { ... }
>    }
>
> or, if we want to keep strong nesting:
>
>    figure {
>        /* root properties */
>        {
>            img { ... }
>        }
>    }
>
> and, if you don't need to set properties on the figure element
>
>    figure {{
>        img { ... }
>    }}
>
> but maybe I should start another thread for this

I've considered this in the past as well, and think it's probably the
right idea.  It generalizes well to at-rules, too - they just use an
at-keyword to tag the block:

#myregion {
  @region {
    p {...}
    img {...}
    h3 {...}
    h4 {...}
  }
}

We can maybe have an additional rule that if you start the selector
with an &, it doesn't have to be nested, but I'm not sure if that's
necessary.

~TJ

Received on Sunday, 16 June 2013 06:53:08 UTC