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

Re: [css3-regions] @region and specificity

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 26 Mar 2012 15:59:38 +0200
Message-Id: <A3D53A16-84D2-4325-BC5E-5F026E75F4C9@crissov.de>
To: www-style@w3.org
fantasai (2012-03-20 01:45):
> On 01/26/2012 05:28 PM, Vincent Hardy wrote:
>> 
>> Christoph has proposed an alternate syntax:
>> 
>>> h1:region(first) { color: purple; }
> 
>  .first::region h1 { color: purple; }
> 
> … with a functional notation you can easily branch
> 
>  section.foo h1:region(nav .first) em { color: purple; }

JFTR, I did not (want to) propose

  ‘:region(’ <selector> ‘)’

but

  ‘:region(’ <identifier>? ‘)’

where the identifier comes from CSS itself, i.e. it is a named region and not a class name, since I would design the Flows and Regions module around

  ‘@region’ <identifier>? ‘{’ … ‘}’

with regions pulling in named flows, as in

  foo#special  {flow:    bar;}
  foo#other    {flow:    baz;}
  @region quuz {content: bar;}
  foo              {color: red;}
  foo:region       {color: orange;}
  foo:region(quuz) {color: green;}

  <foo id="none">I’m red.</foo>
  <foo id="other">I’m orange.</foo>
  <foo id="special">I’m green.</foo>
Received on Monday, 26 March 2012 14:00:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:53 GMT