W3C home > Mailing lists > Public > www-style@w3.org > June 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 16 Jun 2013 08:52:21 +0200
Message-ID: <CAAWBYDAz=R6Kp-nLkqqJArcysRfaYom3WJDBo2o0bzd71YZ+wg@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, Alan Stearns <stearns@adobe.com>, W3C WWW Style <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC