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

Re: CSS Hierarchies / Selector Nesting Proposal

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 02 Jun 2011 11:25:45 -0400
Message-ID: <4DE7AB79.9060005@mit.edu>
To: Brad Kemper <brad.kemper@gmail.com>
CC: www-style@w3.org
On 6/2/11 11:16 AM, Brad Kemper wrote:
>
> On Jun 2, 2011, at 8:06 AM, Boris Zbarsky wrote:
>
>> On 6/2/11 10:36 AM, Brad Kemper wrote:
>>> Why? It looks clear enough (and eminently parse-able) to me to do this:
>>>
>>> foo {
>>>   &   bar, far, :hover {
>>>     prop: val;
>>>   }
>>> }
>>
>> Is it clear and parseable enough to allow:
>>
>>   foo {
>>     &  >  bar,>  far, ~:hover {
>>       prop: val;
>>     }
>>   }
>>
>> ?
>
> I would say so (it seems unambiguous)

For what it's worth, your original example _is_ ambiguous.  Consider:

   foo {
     & bar, :hover {
     }
   }

Is that the same as:

   foo bar, foo:hover { }

or as:

   foo bar, foo :hover { }

?

> I am assuming that the purpose of the "&" is so that you don't start trying to read 'bar' as a property

Yes.

> But once you have it starting the line, I'd think you'd be into 'inner selector' mode and proceed from there. But if you disagree, then I am interested in hearing why.

See above.

-Boris
Received on Thursday, 2 June 2011 15:26:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:41 GMT