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

Create spacing tokens #2575

Closed
4 tasks done
Tracked by #2355
vnys opened this issue Oct 12, 2022 · 6 comments · May be fixed by #2579
Closed
4 tasks done
Tracked by #2355

Create spacing tokens #2575

vnys opened this issue Oct 12, 2022 · 6 comments · May be fixed by #2579
Assignees
Milestone

Comments

@vnys
Copy link
Member

vnys commented Oct 12, 2022

@vnys
Copy link
Member Author

vnys commented Oct 25, 2022

Since we’re using a hard grid in EDS 2.0, that means that to achieve an optical vertical margin of 16px for example, we sometimes have to use odd numbers like 9 or 11 depending on the line-height and font-size of the text. To make this easier to work with, my initial idea was to use compound tokens with every possible combination of horisontal and vertical padding value, as well as variants that ensure that the baseline is snapped to the nearest grid line and vertically centered text. After generating sets for tight, compressed, comfortable and relaxed line-heights, I ended up with roughly 24.000 lines of tokens 😁 So that obviously won’t work. Back to the drawing board.

@vnys vnys mentioned this issue Feb 8, 2023
44 tasks
@vnys vnys added this to the EDS 2.0 milestone Feb 10, 2023
@vnys
Copy link
Member Author

vnys commented Mar 9, 2023

Revisiting after the Behind the System presentation from Tokens Studio last week. In the presentation Eric Singhartinger mentions an article by Nathan Curtis where he uses the following terminology:

  • Inset (inside component)
  • Inset squish (larger horizontal inset than vertical, button for example)
  • Inset stretch (smaller horizontal inset than vertical, input field for example)
  • Inline (horizontal space between nested components)
  • Stack (vertical space between nested components, called “block” in CSS)

@marinalinn
Copy link
Collaborator

marinalinn commented Nov 3, 2023

In order to can join into this task I broke it into the following items. Im currently working in the "Typography" item:

Research: compared how 6 different design system are measuring their spacing and naming it.
Spacing structure: collect all the information related to spacing that we have now.
Structure: divided this in their "minimum" unit to clarify different typologies, definitions and ways to measure. This ended up in Scale, Direction, Position, Sizes, Proportions and Surfaces.
Surfaces:

  • Grid: created definitions for Mobile, Tablets and Desktops.
  • Components: collected the top-bottom and right-left margins in components and how they behave inline and stack.
  • Typography: collecting all the relations we have between font-size and line-height to luckily find a pattern and create a guideline for it 💃

Naming: after figure it out typography guidelines we will be able to name tokens.

@marinalinn
Copy link
Collaborator

marinalinn commented Nov 3, 2023

@vnys
Copy link
Member Author

vnys commented Jan 4, 2024

Update: We’re waiting for feedback from Figma about an estimated time of delivery for typography variables

@marinalinn
Copy link
Collaborator

This task is in Todo while we work on the Typography component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants