stylelint-config-sass-guidelines
stylelint-config-sass-guidelines copied to clipboard
Order `dollar-variables` should always come first
trafficstars
For SCSS users, sometimes we need to assign custom CSS properties to SCSS variables, which requires those variables be defined before custom properties are. But with the current ordering, this is impossible.
div {
$color: blue;
// Throws an error saying this should be placed above $color.
--theme-color: #{$color};
}
Can we swap the ordering here of custom-properties and dollar-variables so that variables always come first and before all others?
e.g.
"order/order": [
[
"dollar-variables",
"custom-properties",
...
Or, maybe custom properties should always be encouraged to be used instead of Scss vars? And that's why this ordering is there? 🤔
If that's the case, feel free to close this out and ignore my request.