-
-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Support updated $duration object format #116
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
Conversation
…atibility Co-authored-by: lukasoppermann <[email protected]>
Changes this PR to focus only on the duration change. |
Co-authored-by: lukasoppermann <[email protected]>
Changed the PR to focus only on duration tokens as requested. Reverted all dimension-related changes and kept only the duration utilities and tests. Commit: 3efd083 |
The duration transformer has not been adjusted yet. Make sure to use the durationutils in the trasnformer and update the duration transformer test t include the new object values |
Co-authored-by: lukasoppermann <[email protected]>
Added duration transformers that use the duration utilities and updated tests to include both new object format and old string format. Created |
Merge the secondes to duration and ms to duration transfomers and tests into one and update the initial message in the PR. |
Co-authored-by: lukasoppermann <[email protected]>
Merged the duration transformers and tests into single files as requested. The two separate transformers ( |
Change this to have a durationToCss transformer that handles both |
Co-authored-by: lukasoppermann <[email protected]>
Created a unified |
…ctly Co-authored-by: lukasoppermann <[email protected]>
…al directly Co-authored-by: lukasoppermann <[email protected]>
Co-authored-by: lukasoppermann <[email protected]>
Co-authored-by: lukasoppermann <[email protected]>
This PR implements support for the updated
$dimension
and$duration
token formats introduced in design tokens specification PR #244.Fixes #98
Changes
The specification changed dimension and duration tokens from string values to object values:
Old format:
New format:
Implementation
New Utility Functions
src/utilities/dimensionUtils.ts
with comprehensive utilities to handle both formatsUpdated Transformers
All dimension transformers now support both formats:
dimension/pixelToRem
dimension/remToPixel
dimension/pixelUnitless
Backward Compatibility
Example Usage
Test Coverage
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.