Skip to content
New issue

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

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

Already on GitHub? # to your account

Extending inner of :not can lead to invalid css #2031

Closed
mgreter opened this issue Apr 22, 2016 · 2 comments
Closed

Extending inner of :not can lead to invalid css #2031

mgreter opened this issue Apr 22, 2016 · 2 comments

Comments

@mgreter
Copy link
Contributor

mgreter commented Apr 22, 2016

Continued from #1960 (related to sass/node-sass#1464 and #2017).

Sample:

:not(.asd, .qwe) {
  content: test;
}
:not(.foo) {
  content: test;
}
.bar, .baz {
  @extend .foo;
}

libsass 3.5.5+:

:not(.asd, .qwe) { content: test; }
:not(.foo):not(.bar):not(.baz) { content: test; }

libsass 3.3.2 (sassmeister):

:not(.asd, .qwe) { content: test; }
:not(.foo) { content: test; }

ruby sass:

:not(.asd, .qwe) { content: test; }
:not(.foo):not(.bar):not(.baz) { content: test; }

Before 3.3.5 we were silently dropping the additional selectors inside :not.
Test cases should also test for other pseudo selectors and include linked issues.

@mgreter
Copy link
Contributor Author

mgreter commented Apr 22, 2016

The following sample gives some insight what's happening behind the scenes:

test {
  content: selector-extend(":not(.foo)", ".foo", ".bar");
}

yields

test {
  content: :not(&.foo, &.bar); }

@nicovalencia
Copy link

👍

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

No branches or pull requests

2 participants