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

Letter spacing tokens #68

Closed
TravisSpomer opened this issue Sep 13, 2022 · 0 comments
Closed

Letter spacing tokens #68

TravisSpomer opened this issue Sep 13, 2022 · 0 comments
Labels
export Platform-specific export concerns feature New feature or request ios iOS- and Apple-specific issues

Comments

@TravisSpomer
Copy link
Member

TravisSpomer commented Sep 13, 2022

JSON format value: -0.02

  • W3C: -0.02rem (add rem)
  • Figma Tokens: -2% (multiply by 100 and add %)
  • CSS: -0.02em (add em for letter-spacing)
  • Xaml: -20 (multiply by 1000 and round to an int for CharacterSpacing)

Swift uses fixed pt values for letter spacing, but all other platforms use em/%, and we don't know the corresponding font size for any letter spacing token, so it isn't possible to convert the values. For now, though, we don't actually require being able to use the same letter spacing token on other platforms, so we can just conveniently ignore that problem for now. When we switch to the W3C format it won't matter because that format supports both px and rem values anyway (though it should really be em, not rem...).

@TravisSpomer TravisSpomer added feature New feature or request export Platform-specific export concerns ios iOS- and Apple-specific issues labels Sep 13, 2022
@TravisSpomer TravisSpomer added this to Soon in What's going on Sep 13, 2022
What's going on automation moved this from Soon to Recently finished Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export Platform-specific export concerns feature New feature or request ios iOS- and Apple-specific issues
Projects
No open projects
What's going on
Recently finished
Development

No branches or pull requests

1 participant