-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSSstatus:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken
Description
I am re-raising this issue.
I am currently working on a CSS utility library. Almost all the classes have a single CSS property, yet they are all formatted by Prettier to take up multiple lines. For a single property, this is a massive waste of space and far less readable.
e.g. here is some code from the relatively popular [Tachyons library](e.g.: https://github.com/tachyons-css/tachyons/blob/master/css/tachyons.css):
.mt0 { margin-top: 0; }
.mt1 { margin-top: .25rem; }
.mt2 { margin-top: .5rem; }
.mt3 { margin-top: 1rem; }
.mt4 { margin-top: 2rem; }
.mt5 { margin-top: 4rem; }
.mt6 { margin-top: 8rem; }
.mt7 { margin-top: 16rem; }
Here's is what it looks like after using Prettier:
.mt0 {
margin-top: 0;
}
.mt1 {
margin-top: 0.25rem;
}
.mt2 {
margin-top: 0.5rem;
}
.mt3 {
margin-top: 1rem;
}
.mt4 {
margin-top: 2rem;
}
.mt5 {
margin-top: 4rem;
}
.mt6 {
margin-top: 8rem;
}
.mt7 {
margin-top: 16rem;
}
It is clear to me which one is preferable! Please reconsider.
Yago, dcsaszar, mvtbum, hacknug, ericmatte and 116 morehawkrives, brandonkal, lars-berger, D41126522, vaiil and 6 morewickkidd, simonwiles, jonikorpi, jakobrosenberg, discretegames and 3 more
Metadata
Metadata
Assignees
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSSstatus:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken