Re: [css-hierarchies] Why require the & character?

On Sep 2, 2013, at 12:36 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> Forking to a new thread, trimming the cc list accordingly.
> 
> On Mon, Sep 2, 2013 at 8:15 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> Slightly off topic:
>> Hierarchies has not received a lot of review yet, but my view so far is that writing "&" so many times makes it more likely that it will be accidentally left off. I can see why you'd want it when modifying the outer selector with a class, pseudo-class, attribute selector, etc., but why is it needed for embedded rules that could have continued the outer rule with a space character?
> 
> Because the grammar is ambiguous without it - you can't tell apart
> some types of selectors from properties without arbitrary lookahead.

This could be solved by surrounding the inner level with its own curly braces, inside from those already surrounding the declarations list. It's two more characters, but better than probably at least that many "&" characters. 

Received on Tuesday, 3 September 2013 14:27:25 UTC