Re: [selectors4] feedback

On 06/12/2013 08:59, Gavin Engel wrote:
> 2. It is somewhat non-intuitive as to where the reference (/for/)
> applies to the second selector (/input/).  If we use a more complex
> example we can see this more clearly:
>
>     label:matches(:hover, :focus) /for/ .foo input { }
>
> Does the/for/'s id apply to the .foo or to the input?

It applies to .foo

Combinators always describe the relationship between the two "compound 
selectors" they are in-between, nothing further.

http://dev.w3.org/csswg/selectors4/#compound


> I imagine it is
> meant to always apply to the /final/ simple selector (/input/), even
> though reading from left-to-right the /for/ is next to .foo.  This makes
> it somewhat non-intuitive.  It also removes the /possibility/ of
> attaching the id to the first simple selector (/.foo/).

Why did you imagine that, if you also find it non-intuitive? Can we make 
the spec clearer?

-- 
Simon Sapin

Received on Friday, 6 December 2013 19:45:29 UTC