[csswg-drafts] [css-selectors] Reconsider removing selector list invalidation

ExE-Boss has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-selectors] Reconsider removing selector list invalidation ==
https://drafts.csswg.org/selectors-4/#grouping
> **Warning:** the equivalence is true in this example because all the selectors are valid selectors. If just one of these selectors were invalid, the entire selector list would be invalid. This would invalidate the rule for all three heading elements, whereas in the former case only one of the three individual heading rules would be invalidated.

I wasn’t aware of that for a long time and wrote many of stylesheets with the assumption that a single unknown selector in a selector list wouldn’t invalidate the whole selector list[<sup>[1]</sup>](#user-content-footnote-1 "Footnote 1: An actual selector list I once wrote").

Even in the specification, global selector list invalidation is said to be [considered a legacy mistake in appendix B](https://drafts.csswg.org/selectors-4/#compat).

I propose to run a web study, similar to what Chrome did in #2156 to see if this ***very dumb*** legacy mistake can be fixed by getting rid of selector list invalidation.

---

<dl>
<dt id="footnote-1">Footnote 1</dt>
<dd>
An actual selector list I once wrote:

```css
/* The `[data-ie]` attribute contains the string "legacy" for IE8 or older,
   and IE8 only supports the single‑colon `::before`/`::after` syntax */
html[data-ie~="legacy"] pre.line-numbers:before,
pre.line-numbers::before {
 content: "1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9\A 10…"; /* all the way up to 9999 */
}
```
</dd>
</dt>

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3082 using your GitHub account

Received on Wednesday, 5 September 2018 10:42:47 UTC