-
Notifications
You must be signed in to change notification settings - Fork 461
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
@page wrapped around a class will output the wrong selection #2548
Comments
Did you try this with Ruby Sass? |
I have not. Would you want me to try it and report back ? |
Yes please, because if Ruby has the same behaviour, it's a feature not a bug 😉 |
Lol but what does that mean? I don't know the history of ruby sass and it seems like you are alluring to something |
Ruby Sass is the official Sass. LibSass is an implementation of the Sass language. Our job is to mimic the behaviour of Ruby Sass. |
// Ruby Sass
@print {
.abc .random {
color: red; }
@page {
.abc {
size: a3; } } }
// Dart Sass
@print {
.abc .random {
color: red;
}
@page {
.abc {
size: a3;
}
}
}
// LibSass
@print {
.abc .random {
color: red; }
@page {
.abc {
size: a3; } } } |
If you think this behaviour is wrong please open an issue with Ruby Sass. https://github.com/sass/sass |
I know this is a tad weird because you should not need to wrap the @page selector in any situation, but we are wrapping bootstrap in a class. Bootstrap uses the page in the middle of a few selectors :
https://github.com/twbs/bootstrap/blob/v4.0.0/scss/_print.scss#L86-L91
So when we do
The css is compiled with the parent class, thus making the minification confused and break.
input.scss
Actual results
I am using node-sass 4.7.2
Expected result
I just want the class to be stripped.
node-sass 4.7.2
version info:
The text was updated successfully, but these errors were encountered: