validator
validator copied to clipboard
Invalid Level 3 :not() selectors
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.