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

Re: [selectors4] Multiple subject indicators

From: Lea Verou <lea@w3.org>
Date: Thu, 13 Jun 2013 14:18:54 +0200
Cc: "www-style list" <www-style@w3.org>, <adrian@featurist.co.uk>
Message-Id: <D4E2BA8C-5318-47D2-BB10-DBDAF56DDDE7@w3.org>
To: François REMY <francois.remy.dev@outlook.com>
Brilliant! IMO this is better than both the options I outlined.


Lea Verou
W3C developer relations
http://w3.org/people/all#leahttp://lea.verou.me ✿ @leaverou






On Jun 13, 2013, at 14:17, François REMY <francois.remy.dev@outlook.com> wrote:

>> [...] the behaviour of CSS Selectors is undefined when
>> multiple subject indicators [1] are specified. [...]
>> 
>> I guess there are two reasonable things to do here:
>> 
>> a) The selector is invalid and the entire rule is discarded per regular CSS rules
>> b) The last subject wins
> 
> I've no strong opinion on this, but I wonder why you didn't include a third option:
> 
>  (c) both subjects are valid ('!ul + !p img' selects both the 'ul' and the 'p')
> 
> This is actually the same as '!ul + p img, ul + !p img' but is shorter.
> 
> 
> 
> I've been thinking aloud just now, and found one case where I could have used this:
> 
>   article > !h2 ~ !* { display: none; }
> 
> which would only display the introductory paragraphs of a blog post (provided that like me you use an H2 when you enter more details)
> 
>   article
>       p
>       p
>       h2
>       p
>       p
>       ...
> 
> 
> 
Received on Thursday, 13 June 2013 12:18:59 UTC

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