Re: [css3-regions] @region and specificity

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 UTC