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

Clean up typography API output #1061

Closed
jamesmockett opened this issue Jan 5, 2024 · 0 comments · Fixed by #1068
Closed

Clean up typography API output #1061

jamesmockett opened this issue Jan 5, 2024 · 0 comments · Fixed by #1068

Comments

@jamesmockett
Copy link
Contributor

jamesmockett commented Jan 5, 2024

Adding tests for Source Foundation's token and typography output has highlighted that the output from the typography API could be cleaned up without affecting functionality.

Currently it looks like this:

font-family: "GT Guardian Titlepiece", Georgia, serif;
font-size: 4.375rem;
line-height: 1.15;
font-weight: 700;
;

/*
 * Child elements (e.g. <Link/>) can use this variable
 * to set the thickness of their underline.
 *
 * The thickness for each font type and weight is defined
 * in the underlineThickness object.
 */
--source-text-decoration-thickness: 6px;

The comment is unnecessary and the output includes additional whitespace and a spurious semicolon.

In addition, the object style output includes a fontStyle property which is always set to undefined.

(A more extensive refactoring of the typography code is covered by #1039)

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.

1 participant