-
Notifications
You must be signed in to change notification settings - Fork 1.3k
The "not" pseudo-selector (:not()) missing from compiled code #2330
Comments
Can you try with 4.8.3, there was a libsass bump to fix some issues |
I just tried on CodePen (which is supposed to be running 4.8.3) and got .btn.disabled:not(.btn-default):not(
.button-default):not(.btn-outline):not(
.button-outline), .btn:disabled:not(.btn-default):not(
.button-default):not(.btn-outline):not(
.button-outline),
.button.disabled:not(.btn-default):not(
.button-default):not(.btn-outline):not(
.button-outline),
.button:disabled:not(.btn-default):not(
.button-default):not(.btn-outline):not(
.button-outline) {
background: #fefefe !important;
color: #111111 !important;
} |
Hi Nick, Thanks for the quick reply. I just tried it with 4.8.3 as well with same results as in 4.8.1 I wonder if libsass changed something, or I am doing something completely wrong (Maybe I should stop writing my sass this way?). To give you a bit more background, I found the issue through gulp-sass, but was able to recreate it through node-sass. I really don't think this helps any, but thought I'd mention it. |
Could you please compare against dart-sass? Sassmeister is very out of date.
Note: if you have |
Seems to be the correct output I also put up a test repo here just in case: https://github.com/dennisbaskin/node-sass-no-not-example |
Thanks @xzyfer 😸 I didn't quite understand what you meant by the last sentence though. Were you comparing dart-sass to expected output, or the broken libsass? Thanks again for the quick response! |
I just wanted to compare the output to an up to date version of Sass to cross check. Dart Sass is easier to install than Ruby Sass. In this case. The LibSass output is wrong, but not broken. It does the right in so far as
is the same as the following as far as the browser is concerned
The second one just has some duplication. So yes it's a bug, but it shouldn't not break anything as far as the browser is concerned. |
I see. @xzyfer the bug I am reporting does break the output though, and not just how the code is styled. It comes out to be:
As you can see it drops the I added an example here: https://github.com/dennisbaskin/node-sass-no-not-example |
Sorry I was looking at the 4.7.2 output. I can see the issue now. |
Created an upstream issue in sass/libsass#2630 |
Thank you :) |
Also noticed the output above for :not uses the selector list argument feature of :not which is introduced in css4, but not well supported yet. Maybe some folks running into this issue while using :not? |
I believe this can be closed out, the upstream issue at sass/libsass#2630 has been resolved. I had the problem in the past and can no longer reproduce. (I had been using 4.7.2 previously to avoid this issue and have upgraded to 4.12.0.) EDIT I confirmed what the comments below say, I was wrong: this issue is NOT fixed in 4.12.0. |
I'm using node-sass 4.12.0 and the issue is still reproduced |
As I undersand node-sass 4.12.0 uses libsass 3.5.4 but the issue is fixed in 3.6.0 |
Is definitely still an issue with 4.12.0. Encountered this trying to migrate from node 8 to 10, and node-sass from 4.5.2 to 4.12.0. Unfortunately the lowest version to support node 10 still has this issue, so we are unable to update until this gets fixed. |
Good news! If I don't miss anything, this selector is supported by all latest major browsers (https://developer.mozilla.org/en-US/docs/Web/CSS/:not) and therefore is ready to be implemented. |
This is fixed in libsass 3.6+. Do we have any news on an update with that version included? |
follow #2685 for updates on libsass 3.6 |
#2685 is locked for 3 years, is there a chance to get this fixed? |
Hello,
I am experiencing a very strange problem that I could not pinpoint wether it's libsass or node-sass. But one thing I know for a fact is the different versions of node-sass where the bug (maybe feature?) was introduced. The difference was between versions 4.7.2 and 4.8.1.
I checked sassmeister and everything compiles correctly there. But when compiling via node I am seeing the following:
Example with v4.8.1
package.js:
index.js:
test.scss
And the following is the output I am getting:
The above is also reproducible with latest master.
When I switch versions to 4.7.2 and below I get the expected output:
Example with v4.7.2
package.json:
output:
Verified above issue on MacOSX and Debian
The only thing I could gather that might help diagnose where this is occurring is the following:
So my guess is that this could be libsass?
I might just be horrible at searching GIT issues, but I was unable to find a matching problem.
Sassmeister works as expected
Please see above examples
I have recreated and pinpointed the issue to specific versions and verified that it still exists in master.
I have a feeling this is a libsass issue, but my examples are using node-sass. If nothing else I hope I can keep this issue for reference and open an issue with libsass if requested to do so.
npm -v
):5.6.0
node -v
):v8.10.0
node -p process.versions
):node -p process.platform
):darwin
node -p process.arch
):x64
node -p "require('node-sass').info"
):(working version info mentione at top)
npm ls node-sass
):The text was updated successfully, but these errors were encountered: