W3C home > Mailing lists > Public > www-style@w3.org > January 2015

Re: [selectors] Reconsider to not drop whole selector list containing an invalid selector

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 9 Jan 2015 15:28:41 -0800
Message-ID: <CAAWBYDBPV_rfow_4tHd4jU7vVAGc6XvS38ijmR7HKVzs5XnsxQ@mail.gmail.com>
To: Binyamin <7raivis@inbox.lv>
Cc: www-style list <www-style@w3.org>
On Thu, Jan 8, 2015 at 1:39 AM, Binyamin <7raivis@inbox.lv> wrote:
> Source: http://dev.w3.org/csswg/selectors/#invalid-selector
>
> Dropping whole selector list containing an invalid selector would lead to
> many future errors.
>
> * Why not just to ignore the invalid selector styling?
> * What is the benefit of dropping whole selector list? The performance?
>
> Today's vendor prefixes leaded problem: @-webkit-keyframes,@keyframes{} is
> be shorter then to repeat whole style list again and again. And repeating
> same thing leads to maintenance and performance problems.

This is indeed a legacy mistake that we wish we could change, but
can't.  Lots of people use this as a "feature" to do
browser-targetting, by putting in a selector with a browser-specific
pseudoclass that doesn't match anything; in other browsers, it'll
force the entire rule to be dropped.  If we changed it, we'd suddenly
break a bunch of pages by applying styles that weren't intended to
apply.

So, unfortunately, this has to stay the way it is.

~TJ
Received on Friday, 9 January 2015 23:29:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:56 UTC