W3C home > Mailing lists > Public > www-style@w3.org > November 2010

Re: [css-selectors] Invalid selectors should not cause the entire group to be dropped

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 15 Nov 2010 12:27:41 -0500
Message-ID: <4CE16D8D.8080408@mit.edu>
To: Peter Beverloo <peter@lvp-media.com>
CC: www-style@w3.org, daniel.glazman@disruptive-innovations.com, annevk@opera.com
On 11/15/10 5:02 AM, Peter Beverloo wrote:
> The Selectors (Level 3) module defines[1] that a single invalid selector
> in a group is enough to drop the entire rule. While this was fine
> before, I believe this behavior should be revised: invalid selectors
> should not invalidate the entire selector-group anymore. Instead, they
> could be changed to ":not(*)"

I think the argument in the past has been that if you don't recognize 
the selector, then you don't have a way to tell where it ends and the 
rest of the selector group begins.

That said, I'm not sure that's true; if you can find the end of the 
selector group by looking for '{' that is not inside parens/quotes/etc, 
then you should be able to find the end of the selector by looking for 
',' that is not inside parens/quotes/etc, right?

If there's no actual fundamental problem with this behavior change, then 
I would somewhat support making it.  It would significantly simplify 
authoring and doesn't seem difficult to implement.

The main concern would be regression risk due to sites relying on this 
behavior.  The most common conscious reliance I know of is hiding rules 
from particular UAs by including selectors they don't recognize in the 
rule, or targeting rules to particular UAs by including selectors only 
they recognize (e.g. their vendor-prefixed selectors).  The former is 
already breakage-prone as UAs implement the entirety of Selectors (and 
hopefully fix whatever bugs are being worked around in parallel).  I 
wonder how widespread the latter is....

-Boris
Received on Monday, 15 November 2010 17:28:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT