-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix(tokens)!: correct space and size tokens #10727
Conversation
BREAKING CHANGES moves all old pixel based size tokens to a “fixed” category and marks them for deprecation. new default size tokens are different sizes new default size tokens convert to REMs when built for web platforms
BREAKING CHANGES moves all old pixel based space tokens to a “fixed” category and marks them for deprecation. new default space tokens are different values new default space tokens convert to REMs when built for web platforms
8c377c7
to
2569cfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the breaking change footer to follow the conventional commits spec (see example in conventions and example PRs)? Otherwise, it won't get picked up in the changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to keep and deprecate the spacing
-named tokens in favor of space
tokens since these were not deprecated beforehand.
#10012 wasn't marked as breaking, but If we restore the spacing
ones, I think we could bundle it with #10014 for the 3.0 release, as they're related. I can update our 3.0 doc afterward. cc @ashetland @geospatialem
packages/calcite-design-tokens/support/tests/__snapshots__/index.spec.ts.snap
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
⭐🚀🚀🚀🚀⭐🚀⭐⭐⭐⭐⭐🚀⭐🚀🚀🚀🚀⭐⭐🚀🚀🚀⭐⭐🚀🚀⭐⭐🚀⭐⭐⭐🚀⭐🚀🚀🚀🚀⭐🚀⭐
⭐🚀⭐⭐🚀⭐🚀⭐⭐⭐⭐⭐🚀⭐🚀⭐⭐⭐⭐🚀⭐⭐⭐⭐🚀⭐⭐🚀⭐🚀🚀⭐🚀🚀⭐🚀⭐⭐⭐⭐🚀⭐
⭐🚀🚀🚀🚀⭐🚀⭐⭐🚀⭐⭐🚀⭐🚀🚀🚀⭐⭐⭐🚀🚀⭐⭐🚀⭐⭐🚀⭐🚀⭐🚀⭐🚀⭐🚀🚀🚀⭐⭐🚀⭐
⭐🚀⭐⭐🚀⭐🚀⭐🚀⭐🚀⭐🚀⭐🚀⭐⭐⭐⭐⭐⭐⭐🚀⭐🚀⭐⭐🚀⭐🚀⭐⭐⭐🚀⭐🚀⭐⭐⭐⭐⭐⭐
⭐🚀⭐⭐🚀⭐⭐🚀⭐⭐⭐🚀⭐⭐🚀🚀🚀🚀⭐🚀🚀🚀⭐⭐⭐🚀🚀⭐⭐🚀⭐⭐⭐🚀⭐🚀🚀🚀🚀⭐🚀⭐
⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
packages/calcite-design-tokens/support/tests/__snapshots__/index.spec.ts.snap
Show resolved
Hide resolved
…i/calcite-design-system into ali-openPR/10012-10014-space-size-tokens-refactor
This reverts commit f18208b.
Related Issue: #10012 #10014
Summary
Corrects space and size tokens to align with the Calcite UI Kit and uses REM based tokens for the web platform token output. Updates Calcite Components to ensure there are no visual breaking changes to components using the updates size and space tokens.
BREAKING CHANGE: Size and Space token values have changed. Line Height tokens exported for JS and ES6 are now unitless.
Size
calcite-size-px: 1px;
calcite-size-xxxs: 0.75rem; // 12px was 2px
calcite-size-xxs: 0.875rem; // 14px was 4px
calcite-size-xs: 1rem; // 16px was 6px
calcite-size-sm: 1.5rem; // 24px was 8px
calcite-size-sm-plus; // removed
calcite-size-md: 2rem; // 32px was 12px
calcite-size-md-plus; // removed
calcite-size-lg: 2.75rem; // 44px was 16px
calcite-size-xl: 3rem; // 48px was 20px
calcite-size-xxl: 4rem; // 64px was 24px
calcite-size-xxxl: 6rem; // 96px was 32px
Space
calcite-spacing-none: 0; // new
calcite-spacing-px: 1px;
calcite-spacing-base: 2px;
calcite-spacing-xxs: 0.25rem; // 4px
calcite-spacing-xs: 0.375rem; // 6px
calcite-spacing-sm: 0.5rem; // 8px
calcite-spacing-sm-plus: 0.625rem; // new
calcite-spacing-md: 0.75rem; // 12px
calcite-spacing-md-plus: 0.875rem; // new
calcite-spacing-lg: 1rem; // 16px was 14px
calcite-spacing-xl: 1.25rem; // 20px was 16px
calcite-spacing-xxl: 1.5rem; // 24px was 20px
calcite-spacing-xxxl: 2rem; // 32px
Pixel based tokens are now categorized under "fixed"
calcite-size-fixed-xxxl: 32px; // deprecated
calcite-size-fixed-xxl: 24px; // deprecated
calcite-size-fixed-xl: 20px; // deprecated
calcite-size-fixed-lg: 16px; // deprecated
calcite-size-fixed-md: 12px; // deprecated
calcite-size-fixed-sm: 8px; // deprecated
calcite-size-fixed-xs: 6px; // deprecated
calcite-size-fixed-xxs: 4px; // deprecated
calcite-size-fixed-xxxs: 2px; // deprecated
calcite-spacing-fixed-lg: 14px; // deprecated
calcite-spacing-fixed-md: 12px; // deprecated
calcite-spacing-fixed-sm: 8px; // deprecated
calcite-spacing-fixed-xl: 16px; // deprecated
calcite-spacing-fixed-xs: 6px; // deprecated
calcite-spacing-fixed-xxl: 20px; // deprecated
calcite-spacing-fixed-xxs: 4px; // deprecated
calcite-spacing-fixed-xxxl: 32px; // deprecated