Skip to content

[Feature]: Better sorting for Style-Dictionary #3192

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

Open
kpanot opened this issue May 7, 2025 · 0 comments · May be fixed by #3194
Open

[Feature]: Better sorting for Style-Dictionary #3192

kpanot opened this issue May 7, 2025 · 0 comments · May be fixed by #3194
Labels

Comments

@kpanot
Copy link
Contributor

kpanot commented May 7, 2025

Context

The current Style-Dictionary CSS formatter provided by the @o3r/style-dictionary package is sorting the variable name based on an alphabetic order.

Proposal

As we do use palettes with names following the pattern <name>-<grade>, where <grade> is a number, a better sorting based on both numeric and string should be applied.

Current result

:root {
  --my-var-10: #000;
  --my-var-00: #000;
}

Expected result

:root {
  --my-var-00: #000;
  --my-var-10: #000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant