-
Notifications
You must be signed in to change notification settings - Fork 464
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
libsass doesn't preserve new lines in nested style (Ruby Sass does) #552
Comments
Ruby Sass preserves other whitespaces as well, if you e.g. have 4 spaces between selectors in SCSS, they remain 4 in the resulting CSS. libsass collapses them to 1 space. |
What does the |
If you checkout the Contribution guide in the wiki, it's so that we can write a sass-spec test case that is "todo" On Sat, Oct 18, 2014 at 2:32 PM, Michał Gołębiowski
|
Another example: Source: .a,
.b {
&.c {
color: red;
}
} Ruby Sass output: .a.c,
.b.c {
color: red;
} libsass output: .a.c, .b.c {
color: red; } |
A PR to sass-spec: sass/sass-spec#114 |
Hmm... just checked and this seems to be passing now on master. @xzyfer did we change anything? |
This doesn't pass on master for me. I get Input
Libsass output
Ruby sass output
|
My guess is the spec is passing due to this issue in sass-spec sass/sass-spec#131 |
The examples here are 100% passing with my latest refactoring! Although there are some other cases where output is not matching exactly and I had to add the "clean" flag to the new tests suite. |
(I read about the reasoning somewhere libsass issue tracker but forgot what was the consensus). With nested style, libsass converts this: a{b:c} to: a {
b: c; } while ruby-sass generates: a {
b: c;
} (with closing parenthesis at new line) Should this be fixed to conform with the output of ruby-sass? |
Actually with the latest ruby sass this compiles to a {
b: c; } Your example looks like you're compiling it in expanded mode!? |
Oh my bad. You are right! I was playing with http://sassmeister.com/, forgot to change to nested. :) Are there plans to add expanded style in LibSass? |
Already done in #910 |
I am an idiot. Sorry and thank you for addressing it! :) |
This should be solved by #910! |
The following SCSS:
is generated by Sass 3.4.5 to the following CSS (when output style is set to nested):
Meanwhile, libsass 3.0 converts it to:
Note that
a
anddiv
are in the same line in the libsass version.Another issue with this example: #551
The text was updated successfully, but these errors were encountered: