Indent broken for css multi-line code
See original GitHub issueWhen using formatting in vscode (1.30.2) with prettier-vscode (v1.8.0). And with the following setting set;
{
"prettier.stylelintIntegration": true,
"prettier.eslintIntegration": true
}
My css styles that are multi-line are given a wrong indent.
.styles {
background-image:
linear-gradient(
30deg,
rgba(247, 251, 254, 1) 0%,
rgba(221, 226, 232, 1) 100%
);
box-shadow:
inset 0 2px 7px 1px rgba(255, 255, 255, .5),
inset 0 -5px 20px rgba(187, 200, 225, .35),
0 2px 6px rgba(40, 39, 66, .14),
0 10px 20px rgba(40, 39, 66, .06),
76px 75px 169px -35px rgba(0, 0, 0, .4);
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to keep indent for second line in ordered lists via CSS?
If you have multiple-line list items, and need consistent vertical spacing, the solution is to add vertical border-spacing to the ol selector, ...
Read more >text-indent - CSS: Cascading Style Sheets - MDN Web Docs
The text-indent CSS property sets the length of empty space (indentation) that is put before lines of text in a block.
Read more >How to set indent the second line of paragraph using CSS
Method 2: By making the position relative to the first line, set the text-indent to -26px and padding-left value to 26px. Here in...
Read more >When a Line Doesn't Break | CSS-Tricks
We expect a line to break when the text on that line reaches the parent box boundaries. We see this every time we...
Read more >How can you indent multiple lines all at once? - HTML FAQ
If you prefer using [spacebar] to indent your code rather than using [tab], you can select multiple lines by holding the [alt] key...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay found the solution to fix my problem, for the most part. But this not perfect for me as I preferred the editorconfig to handle the indentation for me. But yeah this not a mayor issue.
To fix the issue set the
indentation
rule. If this is not set the indentation is not used correctly used by prettier-vscode. And not corrected by stylelint with the fix flag.The only issue that is still present, is the the second example. If I am using using a box-shadow with multiple lines this will be wrongfully indented. But if you use stylelint, this is corrected.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.