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 and :not selectors generating invalid css #2431

Closed
kenjiqq opened this issue Jul 4, 2017 · 1 comment
Closed

Extending and :not selectors generating invalid css #2431

kenjiqq opened this issue Jul 4, 2017 · 1 comment

Comments

@kenjiqq
Copy link

kenjiqq commented Jul 4, 2017

Libsass is compiling invalid css when extending classes that are used in :not() pseudo selectors.

If a class is used in a not selector and something extends that class then it output another css selector with a not selector where the original class is replaced with the extending selector.
This can create invalid css like :not(.page .new-btn) that causes Chrome and Firefox to just ignore that entire rule.

input.scss

.btn {
    display: block;
}

.page .new-btn {
    @extend .btn;
}

.link:not(.btn) {
    @extend .btn;
}

Actual results

libsass 3.4.X or 3.5.X

.btn, .page .new-btn, .link:not(.btn):not(.page .new-btn):not(.link:not(.btn)) {
  display: block; }

Expected result

ruby sass 3.4.24

.btn, .page .new-btn, .link:not(.btn) {
  display: block; }

version info

sassc      3.4.5
libsass    3.4.X and 3.5.X
ruby sass 3.4.24
@mgreter
Copy link
Contributor

mgreter commented Jul 4, 2017

Closing as duplicate of #2055

# 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