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

chore(tokens): sort scss by name then by reference #69

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

evwilkin
Copy link
Member

Closes #17

This PR:

Though changes with referenced vars may be hard to predict the adjusted file outcome, this should limit variability in output scss files due to consistent alphabetical sorting, hopefully making the diffs between files smaller and more consistent as well.

Note: looking at tokens-default.scss as an example, the newly output file seems to be about 30 lines longer which is worth further investigation to confirm where these additional rules are coming from.

@srambach
Copy link
Member

Let's remove the sort by reference, since CSS doesn't care about that, and it could introduce an inconsistency in the order.

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments just about not needing to worry about the order the vars are used since there's no technical limitation to CSS vars with their declaration/reference order as long as they're in the same scope.

packages/module/build.js Outdated Show resolved Hide resolved
packages/module/build.js Outdated Show resolved Hide resolved
srambach and others added 2 commits June 21, 2024 16:55
Copy link
Member

@srambach srambach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good without the reference sort.

@srambach srambach merged commit 718de05 into patternfly:main Jun 21, 2024
3 checks passed
Copy link

🎉 This PR is included in version 1.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Style dictionary - Sort the generated scss files
3 participants