csscomb.js
csscomb.js copied to clipboard
Allow sorting of custom property (css vars)
As of now, if I use this code
.wrapper {
--gutter: 62px;
--width: 1314px;
max-width: calc(var(--width) + var(--gutter) * 2);
margin: 0 auto;
padding: 0 var(--gutter);
}
it gets sorted like so
.wrapper {
--width: 1314px;
max-width: calc(var(--width) + var(--gutter) * 2);
margin: 0 auto;
padding: 0 var(--gutter);
--gutter: 62px;
}
is it possible to use the same functionality in the sort-order parameter as $variable
but with custom property? It'd be nice we could sort every css vars to be at the top of the block
I am also looking forward to be able to sort custom properties.
I am also looking forward to be able to sort custom properties.
@Romalei At my company we completely removed the sorting function of csscomb since it was making mess every time we used a css variable, sad but they don't seem to care about that issue
That's sad. I wish to find time to create a PR on my own, but not promising anything 😅
This would be super useful.