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

Refactor size spacing values #71

Closed
1 task
leeejune opened this issue Apr 1, 2022 · 17 comments · Fixed by #86
Closed
1 task

Refactor size spacing values #71

leeejune opened this issue Apr 1, 2022 · 17 comments · Fixed by #86
Assignees
Labels
design tokens Status: Work In Progress Issue or Pull Request work is in Progress Type: Feature New Feature

Comments

@leeejune
Copy link
Contributor

leeejune commented Apr 1, 2022

Is your feature request related to a problem? Please describe.
Content uses 90px spacing between large content sections. There is no token that fits this need.

Describe the solution you'd like
Add a 90px spacing after our XXXL 64px spacing token.

Describe alternatives you've considered
One suggestion made was to add two spacing tokens together (64px + 24px), but it is not an efficient way to integrate larger spacing.

Additional context
Naming might need to be reconsidered as the number of X's could feel overwhelming.
Content uses 90px in most of their pages.

Next steps

  • Add to Figma library
@blackfalcon
Copy link
Member

I feel like having a 90px option is a result of how our grid solution didn't really think to accommodate this.

I look at how Material had alternate grid solutions per different media types. We simply cram 12 columns into a smaller space.

Looking at Spectrum they take a very comprehensive approach to their layout and the concept of regions. E.g. if you have a layout that is three regions of 4 columns each, is the full layout 3 columns or 12?

The more we embrace these kinds of concepts the simpler we can make an official grid/layout system.

@leeejune
Copy link
Contributor Author

leeejune commented Apr 5, 2022

The 90px spacing would be used for vertical spacing and the grid system only accommodates horizontal spacing. The content team separates large groups of content with 90px of space.

However, I like the solution of having different grids for screen sizes. Seems like it belongs more in this issue: AlaskaAirlines/WebCoreStyleSheets#114

@braven112
Copy link
Member

Let's sync up with Amanda's template work and come up with a list of all potential tokens

@braven112 braven112 assigned leeejune and unassigned blackfalcon Jun 14, 2022
@blackfalcon
Copy link
Member

What is the status of this @leeejune? Has this been addressed outside the scope of tokens or is there still a need to solve this problem?

@blackfalcon blackfalcon added this to the design tokens v3.10-rc milestone Jun 17, 2022
@leeejune
Copy link
Contributor Author

@blackfalcon Content still seems to be needing a larger spacing token. We were thinking 80px (5rem) could work.

@blackfalcon
Copy link
Member

@leeejune I am thinking that we painted ourselves into a corner with our current naming strategy. Looking at other design systems, where we embraced a naming convention like -100 and -200 in some parts, why we did not do this universally I don't know, but maybe we can now.

See https://spectrum.adobe.com/page/design-tokens/#Size-tokens

Let's talk about how we can look at going in an alternate direction and look to deprecate the existing xxl convention.

@leeejune
Copy link
Contributor Author

@braven112
Copy link
Member

braven112 commented Aug 18, 2022

Naming is hard. Here are how 4 other design system do it. I personally find the proposed number system confusing especially if we only support some of the values in the 100, 200 format.

https://carbondesignsystem.com/guidelines/spacing/overview/#spacing
https://www.lightningdesignsystem.com/design-tokens/#category-spacing
https://design.gs.com/foundation/spacing
https://momentum.design/tokens/space

I think one of 2 options would work:

  1. Option 1 embrace the t-shirt size way but simplify to 4XL vs XXXXL. I think this one is the most intuitive to use. Downside is that from a practical stand point it makes it kind of hard to do a 3.5XL if we wanted something in between in the future.
  2. Option 2 use the 100 system but simplify the ramp up like so...

Image

Then we still have the option of doing 950 or 850 if the need presents itself.

@jason-capsule42
Copy link
Member

I like the 100->200->300,... naming convention. It's easier to read and I agree it leaves room for extending to other increments more easily.

That said, I hope we don't go and create too many of these. It seems half of the point of them is to create consistent usage of layout dimensions. The more we create the more we have variation in the design. Not my area I know... but there has to be a line in the sand somewhere about how many of these we are going to support.

@leeejune
Copy link
Contributor Author

leeejune commented Aug 22, 2022

I followed Spectrum's way to do it, which is using a base value and naming the others as the multiple of the base (8px is 100 and 12px is 150). I agree that we shouldn't be adding more. In that case, I think we can go with the 100, 200 scale. One thing I don't like about the 100 scale is that the token name doesn't actually reflect the scale or size of the padding. Perhaps we can change our t shirt naming by making XXXL to 3XL?

Either way, I will probably keep the t shirt naming in Figma for the body text because that's what designers are comfortable with.

@blackfalcon
Copy link
Member

@leeejune there are solid use cases for t-shirt vs 100 scale, and I agree we can stick wth the t-shirts for type. Given the examples @braven112 used, this appears to be a real sticky issue with many systems.

IMHO, t-shirts and spacing just didn't work because of the many nuances designers are looking for. Vs type where there are few if no in-between things happening.

I'd love to know how many custom sized are being used in production? What's interesting is that we have a scale of 4+ then it jumps to 8+

Something else I noticed. This scale is all based on 8s. Ok, so let's really own that concept here. This scale at least allows for something between 2x and 3x whereas the current system won't support 56px.

Current px rem New name
4xl 80px 5rem 1000
3xl 64px 4rem 800
2xl 48px 3rem 600
xl 32px 2rem 400
l 24px 1.5rem 300
m 16px 1rem 200
s 12px 0.75rem 150
xs 8px 0.5rem 100
2xs 4px 0.25rem 50
3xs 2px 0.125rem 25
4xs 0 0 0

@leeejune
Copy link
Contributor Author

@blackfalcon What you have in that table is actually exactly what I have! Seems like we are on the same page.

Screen Shot 2022-08-23 at 9 56 06 AM

@blackfalcon
Copy link
Member

@leeejune close, but ... check out 3XL. It should be 800, not 900.

@leeejune
Copy link
Contributor Author

@blackfalcon Oop, faulty human calculation 😆 Will make the edit. Are we going with this solution?

@blackfalcon
Copy link
Member

blackfalcon commented Aug 25, 2022

Acceptance criteria:

  1. New tokens are added
  2. Legacy tokens are marked as deprecated
  3. DO NOT DELETE legacy token names
  4. DO NOT add new token with legacy name convention
  5. Code commit is feat:
Current token Newly added token Value
n/a var(--auro-size-1000) 5rem
var(--auro-size-xxxl) var(--auro-size-800) 4rem
var(--auro-size-xxl) var(--auro-size-600) 3rem
var(--auro-size-xl) var(--auro-size-400) 2rem
var(--auro-size-lg) var(--auro-size-300) 1.5rem
var(--auro-size-md) var(--auro-size-200) 1rem
var(--auro-size-sm) var(--auro-size-150) 0.75rem
var(--auro-size-xs) var(--auro-size-100) 0.5rem
var(--auro-size-xxs) var(--auro-size-50) 0.25rem
var(--auro-size-xxxs) var(--auro-size-25) 0.125rem
var(--auro-size-none) n/a 0

@blackfalcon
Copy link
Member

Already seeing an opportunity for var(--auro-size-500) e.g. 2.5rem/40px.

See this PR: https://github.com/AlaskaAirlines/auro-select/pull/98/files

@blackfalcon blackfalcon mentioned this issue Sep 22, 2022
6 tasks
@blackfalcon blackfalcon assigned blackfalcon and unassigned leeejune Sep 23, 2022
@blackfalcon blackfalcon changed the title Add XXXXL spacing Refactor size spacing values Sep 23, 2022
@blackfalcon blackfalcon added the Status: Work In Progress Issue or Pull Request work is in Progress label Sep 23, 2022
@blackfalcon
Copy link
Member

New issue to update WCSS to support this update

blackfalcon added a commit that referenced this issue Sep 23, 2022
This feature release will add a new scale for size
tokens using a X00 value scale. This update also
deprecates the current scale of XL named values.

Changes to be committed:
modified:   src/size/scale.json
@blackfalcon blackfalcon linked a pull request Sep 23, 2022 that will close this issue
6 tasks
blackfalcon added a commit that referenced this issue Sep 23, 2022
This feature release will add a new scale for size
tokens using a X00 value scale. This update also
deprecates the current scale of XL named values.

Changes to be committed:
modified:   src/size/scale.json
blackfalcon added a commit that referenced this issue Sep 26, 2022
This feature release will add a new scale for size
tokens using a X00 value scale. This update also
deprecates the current scale of XL named values.

Changes to be committed:
modified:   src/size/scale.json
blackfalcon added a commit that referenced this issue Sep 27, 2022
This feature release will add a new scale for size
tokens using a X00 value scale. This update also
deprecates the current scale of XL named values.

Changes to be committed:
modified:   src/size/scale.json
AuroDesignSystem pushed a commit that referenced this issue Sep 27, 2022
# [3.10.0](v3.9.1...v3.10.0) (2022-09-27)

### Features

* **size tokens:** add new token spec scale [#71](#71) ([8be3e7b](8be3e7b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design tokens Status: Work In Progress Issue or Pull Request work is in Progress Type: Feature New Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants