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: Peter Beverloo <peter@lvp-media.com>
Date: Mon, 15 Nov 2010 13:30:18 +0100
Message-ID: <AANLkTinHnnQ3p7zFUF9=Y3_VGJN3pBk0KA6Q+Ne7J=4E@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style@w3.org, annevk@opera.com
On Mon, Nov 15, 2010 at 11:51, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
>
> Le 15/11/10 11:02, Peter Beverloo a écrit :
>
>> 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(*)", similarly to Media Queries[2] which
>> changes invalid queries to "not all".
>
> I tend to disagree. One of the big changes that happened a while ago
> in rendering engines was the generation of one CSSStyleRule only for
> a group of selectors instead of one CSSStyleRule for each selector in
> the group attached to the rule. In my opinion, one of the corollary
> effects is that it confirms an invalid selector invalidates a group
> of selectors containing it.
>
>>   1) In May, Daniel Glazman pleaded for[3] Microsoft, Opera and
>> Apple/Google to add a vendor prefix to the ::selection pseudo-element.
>> Anne van Kesteren pointed out[4] the exact problem I'd like to address:
>> a separate rule would be needed for each of the selectors.
>
> You can't have the butter AND the money for the butter. The whole thing
> is a compromise, always a compromise, and I think that changing now a
> 13 years old behaviour is *very* risky.
>
> </Daniel>
>

I understand that this has been the behavior since CSS1, but
vendor-prefixed pseudo-elements haven't been a problem that long. To
my knowledge ::selection has been the first place where this really
has been an issue, but seeing the new elements in HTML5 which could
require additional styling (such as the video-controls, but also
date/time input fields) that could be done using pseudo-elements, as
WebKit does, it's likely to become more evident.

Putting the discussion about whether WebKit's way is the way to go
aside, for now, the ::selection case shows that it won't be a bad
thing to discuss this.

Peter
Received on Monday, 15 November 2010 12:30:51 GMT

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