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

Allow sorting of custom property (css vars) #636

Open
xposedbones opened this issue Jun 25, 2020 · 4 comments
Open

Allow sorting of custom property (css vars) #636

xposedbones opened this issue Jun 25, 2020 · 4 comments

Comments

@xposedbones
Copy link

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

@romazherdev
Copy link

I am also looking forward to be able to sort custom properties.

@xposedbones
Copy link
Author

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

@romazherdev
Copy link

That's sad. I wish to find time to create a PR on my own, but not promising anything 😅

@S-n-d
Copy link

S-n-d commented Jan 5, 2022

This would be super useful.

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

No branches or pull requests

3 participants