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: Filter ‘default’ suffix from CSS custom properties and Sass / JS variables #1834

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

alimpens
Copy link
Contributor

Describe the pull request

Thank you for contributing to the project!
Please use this template to help us handle your PR smoothly.

What

This filters the 'default' suffix from CSS custom properties and Sass / JS variables when generating our tokens.
So ams.color.default becomes --ams-color and amsColor.

Why

We're remodelling our brand and common tokens, and because of how JSON works, we need to use 'default' a lot.
This isn't necessary for tokens though, so this change filters that out.

How

By adding custom transform functions to our Style Dictionary build.

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

@alimpens alimpens requested a review from a team as a code owner January 29, 2025 10:36
@alimpens alimpens requested review from dlnr and RubenSibon January 29, 2025 10:36
@github-actions github-actions bot temporarily deployed to demo-DES-1141-filter-default-from-tokens January 29, 2025 14:56 Destroyed
@VincentSmedinga VincentSmedinga changed the title chore: Filter 'default' suffix from CSS custom properties and Sass / JS variables chore: Filter ‘default’ suffix from CSS custom properties and Sass / JS variables Jan 29, 2025
@VincentSmedinga VincentSmedinga merged commit 679e517 into develop Jan 29, 2025
7 checks passed
@VincentSmedinga VincentSmedinga deleted the chore/DES-1141-filter-default-from-tokens branch January 29, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants