Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order dollar-variables should always come first #231

Closed
dannobytes opened this issue Apr 4, 2022 · 1 comment · Fixed by #278
Closed

Order dollar-variables should always come first #231

dannobytes opened this issue Apr 4, 2022 · 1 comment · Fixed by #278

Comments

@dannobytes
Copy link

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",
        ...
@dannobytes
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant