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

Re: CSS Hierarchies / Selector Nesting Proposal

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 2 Jun 2011 08:48:22 -0700
Cc: www-style@w3.org
Message-Id: <F5C32C7D-9144-4161-8A40-F7934B32DE92@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

On Jun 2, 2011, at 8:25 AM, Boris Zbarsky wrote:

> 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 { }
> 
> ?

OK, I see the issue now. By inserting the ampersand token, you are being more explicit with regard to space handing. If the use case for each of those two examples is equally strong, then I can see the point of the extra ampersands. And I suppose it is, but haven't thought deeply on it.
Received on Thursday, 2 June 2011 15:48:52 GMT

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