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

fix(web): Fix letter-spacing transformer #25

Merged
merged 1 commit into from
Sep 27, 2023
Merged

fix(web): Fix letter-spacing transformer #25

merged 1 commit into from
Sep 27, 2023

Conversation

alanbsmith
Copy link
Member

@alanbsmith alanbsmith commented Sep 26, 2023

Issue

Fixes #24

Summary

Updates the letter-spacing transformer to use rem instead of em.

Release Category

Web Infrastructure

RayRedGoose
RayRedGoose previously approved these changes Sep 26, 2023
@RayRedGoose RayRedGoose dismissed their stale review September 26, 2023 17:22

instead of changing transformer you can fully remove it. You will need to add letter-spacing string to array in tokenStudioParser on lines 43:

const replacePx = (value: string, key: string) =>
['x', 'y', 'blur', 'spread', 'width'].includes(key) && value !== '0'
? `${parseFloat(value) / 16}rem`
: value;

Copy link
Contributor

@RayRedGoose RayRedGoose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore my last message. other approach works only for composite tokens, for regular values we need to use transformer

@alanbsmith alanbsmith changed the title fix: Fix letter-spacing transformer fix(web): Fix letter-spacing transformer Sep 27, 2023
@alanbsmith alanbsmith added the automerge Automatically merge pull request label Sep 27, 2023
@alanbsmith alanbsmith merged commit 26bcaa7 into main Sep 27, 2023
6 checks passed
@alanbsmith alanbsmith deleted the ISSUE-24 branch October 19, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix letter-spacing transform
2 participants