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.

Add or preserve empty line between CSS rules

See original GitHub issue

Forgive me if this has been asked before but is there a way to keep spacing between CSS rules when formatting?

.login {
    margin-top: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
}

.login.btn {
    border-radius: 0;
    background-color: #5C6166;
    border-color: #4a4a4a;
}

To:

.login {
    margin-top: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
}
.login.btn {
    border-radius: 0;
    background-color: #5C6166;
    border-color: #4a4a4a;
}

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:5
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
cielcommented, Sep 22, 2017

This would be so great. I wish js-beautify obeyed sass-lint more explicitly, but this is the only feature that’s giving me a lot of trouble.

0reactions
alejandroiglesiascommented, Sep 20, 2017

@bitwiseman: I opened the new ticket myself since I think it’s highly relevant #1258.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preserve empty line between CSS blocks #2621 - GitHub
In JS, Prettier never prints blank lines on its own. It only preserves blank lines from the input JS (with some extra rules)....
Read more >
How to add empty line between rules when making CSS from ...
So, the question is: is it possible to configure a sass compiler to make the output css file and preserve the empty line...
Read more >
rule-empty-line-before - Stylelint
Require or disallow an empty line before rules. This rule ignores rules that are the very first node in a source. The fix...
Read more >
white-space - CSS: Cascading Style Sheets - MDN Web Docs
A line breaking opportunity exists after every preserved white space character, including between white space characters.
Read more >
white-space - CSS-Tricks
The CSS white-space property controls how text is handled on the element it is applied to. Let's say you have HTML exactly like...
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