-
Notifications
You must be signed in to change notification settings - Fork 465
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
Never output empty blocks #659
Comments
Do you have any hint about when LibSass happens to behave like this? |
In Ruby sass, when a declaration's value is evaluated to Compare these to Ruby Sass: |
I made a test for this—note however, that actually writing input: .test {
out: null;
} output: .test {
out: null; } |
This is actually an intended behaviour from Sass. As far as I know, to speed up compilation times Sass does not evaluate all CSS values. It does some kind of quick match to see whether a value should be evaluated as SassScript or not. While this behaviour leads to an issue where you can actually output Anyway, this explains the need for a function. If you want to avoid having to declare a function/mixin for this, you can simply wrap foo {
bar: (null);
} |
Thanks @hugogiraudel that's what I figured ;) |
@hugogiraudel is correct. I recently added this is the same smarts to Libsass.
Both functions that return |
Under some circumstances Libsass will output blocks (selectors) without any declarations i.e.
.my-selector { }
Specs added sass/sass-spec#199
The text was updated successfully, but these errors were encountered: