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

Introduce dimension type #1201

Closed
4 tasks done
Tracked by #1205
six7 opened this issue Aug 19, 2022 · 2 comments · Fixed by #1342
Closed
4 tasks done
Tracked by #1205

Introduce dimension type #1201

six7 opened this issue Aug 19, 2022 · 2 comments · Fixed by #1342
Assignees

Comments

@six7
Copy link
Collaborator

six7 commented Aug 19, 2022

In order to support the upcoming W3C format we'll need to introduce a dimension type: https://second-editors-draft.tr.designtokens.org/format/#dimension

The dimension type is a token that specifies a dimension, and is always bound to a specific unit (either rem or px).

As a dimension can be used in a wide range of applications, we need to rethink how we currently apply tokens. A user must choose on right-click what they want to apply this token for, like today but offering more choice.

Image

Things to do

  • Introduce a new dimension type
  • Validate that values of this token are specified as either 24px or 24rem (or {alias} / $alias), if not, give an error message in the value: Value must include either px or rem
  • When right-clicking this token, let the user choose between properties for Spacing (all properties that we have in Spacing tokens), Sizing (all properties of Sizing tokens), borderWidth (all properties of borderWidth tokens)
  • When left-clicking this token, let's be smart: A) User has auto layout selected: Apply the Gap property, B) User has any other frame selected: Apply sizing, C) user has a mix selected: Apply Gap.

This is an issue that will complete #289

@six7 six7 mentioned this issue Aug 19, 2022
1 task
@AndySobol
Copy link

Cool idea! It would also be nice to add the auto option. Now (release 116) it doesn’t work.
Uploading Снимок экрана 2022-08-23 в 12.55.36.png…

@six7
Copy link
Collaborator Author

six7 commented Dec 31, 2022

Shipped in 129

@six7 six7 closed this as completed Dec 31, 2022
@github-project-automation github-project-automation bot moved this from 🤞 To be released to 🕜 In Progress in Tokens Studio for Figma Roadmap Dec 31, 2022
@six7 six7 moved this from 🕜 In Progress to ✅ Done in Tokens Studio for Figma Roadmap Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants