-
-
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
Reproduction:
Prettier strips trailing commas from CSS variables which changes the actual value of the CSS variable:
/* Input */
.foo {
--my-var: in oklab,;
}
/* Output */
.foo {
--my-var: in oklab;
}This breaks situations like this, where the comma needs to be included when resolving the variable at run-time:
.in-oklab {
--interpolation-method: in oklab,;
}
.radial-gradient {
background-image: radial-gradient(var(--interpolation-method,) black, white));
}In that example the comma is necessary if --interpolation-method is defined, but if it's not defined you need to make sure the comma is not there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS