Maybe I'm not configuring it correctly, or maybe it's missing, but I have a great need for preserving my newlines in my css and can't seem to get it to work.
Here's my config:
"css": {
"allowed_file_extensions": ["css", "scss", "sass", "less"],
"end_with_newline": true,
"indent_char": " ",
"indent_size": 2,
"selector_separator": " ",
"selector_separator_newline": false,
"preserve_newlines": true
}
Nope, css-beautifier does not have a preserve_newlines option yet.
+1
+1
would be nice to have
+1虏 for SCSS files.
Issue #563 also has a similar problem. When I save/format a .scss file, the variables at the top and the import calls are all put together, making it hard to maintain. Would be super to just detect empty lines and keep them :+1:
Just for reference:
@import "config";
$background: #ececec;
$color: #00aec8;
body {
font-size: $font-size;
}
... goes like this:
@import "config";
$background: #ececec;
$color: #00aec8;
body {
font-size: $font-size;
}
+1
+1 !!
Since HTML/CSS/JS Prettify plugin apparently draws on this? using that to clean up CSS and SCSS is kind of wonky, basically useless for a long time now -- cleaning up a large enough file by hand and leaving spaces, only to it all mashed back up together by this process is a frustration .. would be really awesome to get a fix in there thanks!
:+1:
+1
+1
+1
+1
+1
+1
Is there an alternative, like an active library or something?
"Active library"?
+1
@reza3vi What are you +1-ing? This is fixed.
Most helpful comment
+1虏 for SCSS files.
Issue #563 also has a similar problem. When I save/format a .scss file, the variables at the top and the import calls are all put together, making it hard to maintain. Would be super to just detect empty lines and keep them :+1:
Just for reference:
... goes like this: