-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS
Description
I think the root cause of this issue is that prettier does not seem to count
;or!importantwhen counting line widths.I've scribbled up a set of tests in this playground that check for edge cases around 80 characters.
For instance, both of the following margin declarations are 81 characters long. The first is not reformatted onto two lines, while the second one is correctly reformatted.
.test-81-char-declaration { margin: $really-long-variable-name $another-really-long-name $a-third-long-nam; margin: $really-long-variable-name $another-really-long-name $a-third-long-name }Prettier formats this as:
.test-81-char-declaration { margin: $really-long-variable-name $another-really-long-name $a-third-long-nam; margin: $really-long-variable-name $another-really-long-name $a-third-long-name; }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS