Skip to content

Conversation

@kyledurand
Copy link
Member

@kyledurand kyledurand commented May 30, 2023

WHY are these changes introduced?

Fixes https://github.com/Shopify/polaris-summer-editions/issues/70
Fixes https://github.com/Shopify/polaris-summer-editions/issues/69

Couple of options here, and I don't love this one but I figured I'd put the exploration up anyway.

We need a value of 6px which would mean a token 1.5. Our current naming convention doesn't really support adding a decimal value that isn't zero trailing. i.e. we have space-05 representing 0.5 but space-15 would mean something completely different.

This adds underscore aliases to decimal values that already exist and also adds a value for space-1_5

The other option, since this is a one off would just be to use calc() to get 6px out of the current tokens but we'll still need a decimal solution for borders

@kyledurand
Copy link
Member Author

I'm adding new border tokens here as well since they're also decimal related

@kyledurand kyledurand changed the title Add new spacing token and aliases Add new spacing and border tokens and aliases May 30, 2023
@kyledurand kyledurand changed the title Add new spacing and border tokens and aliases Add new spacing / border tokens and aliases May 30, 2023
@kyledurand kyledurand requested a review from sarahill May 30, 2023 15:43
Copy link
Member

@aaronccasanova aaronccasanova 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 so far 👍 Can we continue prefixing all net new tokens with experimental? With our current approach, these beta flagged tokens will be globally accessible and I think it's important we clearly communicate and distinguish the tokens we just documented/rolled out across the org from those temporarily living side by side the current system (additionally allowing us to freely make breaking changes). We should be able to follow the pattern established in the color token group everywhere and migrate tokens to any naming convention in the future.

@kyledurand kyledurand requested a review from aaronccasanova May 31, 2023 14:15
@sarahill
Copy link
Contributor

@kyledurand we no longer need the .75 token. There was discussion on removing these as they don't support non 4K monitors well.

@kyledurand kyledurand force-pushed the add-new-space-token branch from 17d1390 to 7d0b80b Compare May 31, 2023 19:14
@kyledurand kyledurand merged commit 546bbee into v11.x.x May 31, 2023
@kyledurand kyledurand deleted the add-new-space-token branch May 31, 2023 19:15
sophschneider pushed a commit that referenced this pull request Jun 1, 2023
### WHY are these changes introduced?

Fixes Shopify/archive-polaris-backlog-2024#70
Fixes Shopify/archive-polaris-backlog-2024#69

Couple of options here, and I don't love this one but I figured I'd put
the exploration up anyway.

We need a value of 6px which would mean a token 1.5. Our current naming
convention doesn't really support adding a decimal value that isn't zero
trailing. i.e. we have space-05 representing 0.5 but space-15 would mean
something completely different.

This adds underscore aliases to decimal values that already exist and
also adds a value for `space-1_5`


The other option, since this is a one off would just be to use calc() to
get 6px out of the current tokens but we'll still need a decimal
solution for borders
sophschneider pushed a commit that referenced this pull request Jun 1, 2023
### WHY are these changes introduced?

Fixes Shopify/archive-polaris-backlog-2024#70
Fixes Shopify/archive-polaris-backlog-2024#69

Couple of options here, and I don't love this one but I figured I'd put
the exploration up anyway.

We need a value of 6px which would mean a token 1.5. Our current naming
convention doesn't really support adding a decimal value that isn't zero
trailing. i.e. we have space-05 representing 0.5 but space-15 would mean
something completely different.

This adds underscore aliases to decimal values that already exist and
also adds a value for `space-1_5`


The other option, since this is a one off would just be to use calc() to
get 6px out of the current tokens but we'll still need a decimal
solution for borders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants