csscomb.js
csscomb.js copied to clipboard
SASS inline comments break sort ordering (and thus the SASS itself)
When using SASS comments inline, for instance next to a declaration, the whole formatting breaks apart.
Example:
.input {
font-family: inherit; // My awesome comment
line-height: 20px;
}
The code above gets transformed into:
.input {
font-family: inherit; // My awesome comment line-height: 20px;
}
Sometimes, it even destroys the new line formatting, for example:
.input {
font-family: inherit; // My awesome comment
line-height: 20px; // My other comment
}
The code above gets transformed into:
.input { font-family: inherit; // My awesome comment
line-height: 20px; // My other comment
}
Seems that CSS-style comments (/* ... */
instead of // ...
) work fine though.
I have another case:
.input {
// My awesome comment
font-family: inherit;
// My other comment
line-height: 20px;
// Another comment
z-index: 1;
}
changes into:
.input {
// My awesome comment
font-family: inherit;
// My other comment
line-height: 20px;
// Another comment
z-index: 1;
}