Resolve extra indent for CSS comma separated value after block comment (#18228)

This commit is contained in:
Seiya authored and GitHub committed 2025-11-17 23:01:08 +08:00
1 parent bb6c853f39
commit 5e82e9a823
4 files changed
+104 -13

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#### Fix extra indent for CSS comma-separated values after a block comment (#18228 by @seiyab)
<!-- prettier-ignore -->
```css
/* Input */
.foo {
background-image:
linear-gradient(to top, blue, red 100%),
/* texture */
repeating-linear-gradient(90deg, pink, yellow 20px, green 20px, pink 40px),
repeating-linear-gradient(90deg, pink, yellow 20px, green 20px, pink 40px);
}
/* Prettier stable */
.foo {
background-image:
linear-gradient(to top, blue, red 100%),
/* texture */
repeating-linear-gradient(90deg, pink, yellow 20px, green 20px, pink 40px),
repeating-linear-gradient(90deg, pink, yellow 20px, green 20px, pink 40px);
}
/* Prettier main */
.foo {
background-image:
linear-gradient(to top, blue, red 100%),
/* texture */
repeating-linear-gradient(90deg, pink, yellow 20px, green 20px, pink 40px),
repeating-linear-gradient(90deg, pink, yellow 20px, green 20px, pink 40px);
}
```