Re: CSS Hierarchies / Selector Nesting Proposal

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 UTC