question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

newline_between_rules support for Sass (enhancement)

See original GitHub issue

Now newline_between_rules option in v1.5.5 is supported for CSS only https://github.com/beautify-web/js-beautify/pull/574 So, in Sass for nesting doesn’t work.

Here my test.js file:

var fs = require('fs');
var beautify_css = require('js-beautify').css;

fs.readFile('test.scss', 'utf8', function(err, data) {
  if (err) {
    throw err;
  }

  console.log(beautify_css(data, {
    indent_size: 2,
    newline_between_rules: true
  }));
});

Output:

$ node test.js

.icons {
  padding: 0;
  li {
    display: inline-block;
  }
  a {
    display: block;
    color: #000;
  }
  a:hover {
    color: #ccc;
  }
}

I hope to add newline_between_rules support for Sass. Regards.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:56
  • Comments:49 (8 by maintainers)

github_iconTop GitHub Comments

31reactions
oletscommented, Sep 22, 2017

Please vote with a 👍 reaction to the initial post rather than +1 messages - that won’t spam subscribers. Thanks!

5reactions
Billskatecommented, Jul 8, 2016

+1, also for less

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS, SCSS, and Less support in Visual Studio Code
Find out how Visual Studio Code can support your CSS, SCSS and Less development. ... you can enhance VS Code's understanding of new...
Read more >
LegacyFileOptions | JS API - Sass
"compressed" removes as many extra characters as possible, and writes the entire stylesheet on a single line. "nested" (the default for Node Sass,...
Read more >
Getting Started with Sass and Bourbon - SitePoint
And since Sass supports the ability to write new and original extensions, it's much easier for developers to come up with their own...
Read more >
css 4 release
Sass is the most mature, stable, and powerful professional grade CSS extension ... support for Zoho Knowledge Base, Multi-level Autonumbering, enhanced user ...
Read more >
Features | Vite
Native ES imports do not support bare module imports like the following: ... @import aliases and URL rebasing are also supported for Sass...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found