W3C home > Mailing lists > Public > www-style@w3.org > December 2013

Re: [selectors4] feedback

From: Simon Sapin <simon.sapin@exyr.org>
Date: Fri, 06 Dec 2013 19:44:59 +0000
Message-ID: <52A2293B.8000405@exyr.org>
To: Gavin Engel <gavin@engel.com>, www-style@w3.org
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:17 UTC