Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Level 3 :not() selectors #10

Open
Mottie opened this issue Mar 23, 2018 · 1 comment
Open

Invalid Level 3 :not() selectors #10

Mottie opened this issue Mar 23, 2018 · 1 comment

Comments

@Mottie
Copy link

Mottie commented Mar 23, 2018

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.

@lahmatiy
Copy link
Member

Validator doesn't validate selectors for correctness at the moment.
Anyway, the level 4 allows a selector list as an argument for :not() and Safari already supports it. L4 also doesn't limit nesting and nested :not() works in Safari as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants