validator icon indicating copy to clipboard operation
validator copied to clipboard

Invalid Level 3 :not() selectors

Open Mottie opened this issue 6 years ago • 1 comments

The level 3 negation pseudo-class only support a single simple selector (ref), so all of the following css selectors should return errors (showing as valid in csstree-validator v1.3.1):

.foo:not(li, div) { color: red; }
.foo:not(li.bar) { color: red; }

/* Nestet: https://www.w3.org/TR/2018/CR-selectors-3-20180130/#negation */
.foo:not(:not(li)) { color: red; }

From my understanding, :not(li.bar) is allowed in level 4, but I'm not sure if nested :not()s will also be allowed.

Mottie avatar Mar 23 '18 14:03 Mottie