chore(fonts): update font names and remove extra tokens#6857
chore(fonts): update font names and remove extra tokens#6857mcoker merged 2 commits intopatternfly:v6from
Conversation
|
Preview: https://patternfly-pr-6857.surge.sh A11y report: https://patternfly-pr-6857-a11y.surge.sh |
| // Manually added from hackathon values | ||
| // Currently not being exported from Figma because they are styles rather than variables | ||
| // The ability to make font variables is reportedly coming by the end of the year | ||
| // LOCAL TOKENS |
There was a problem hiding this comment.
Left a couple of comments about using the font-weight tokens from design, though looks like we're missing the --bold tokens from design. We could either merge the PR as is or apply my suggestions - then follow up with design to add the --bold tokens, then remove our local font-weight tokens.
Also looks like we can yank these text-decoration tokens out, too. We have a whole bushel of 'em now! Lemme know if you'd like to do that with this PR or as a follow-up.
patternfly/src/patternfly/base/tokens/tokens-local.scss
Lines 31 to 36 in 42dfd82
patternfly/src/patternfly/base/tokens/tokens-default.scss
Lines 293 to 304 in 42dfd82
| --pf-t--global--font--weight--body--100: 400; // not currently used | ||
| --pf-t--global--font--weight--body--200: 500; | ||
| --pf-t--global--font--weight--heading--100: 700; | ||
| --pf-t--global--font--weight--heading--100: 700; // not currently used | ||
| --pf-t--global--font--weight--heading--200: 700; |
There was a problem hiding this comment.
I think we can yank out these font-weight tokens, too. We have this now:
patternfly/src/patternfly/base/tokens/tokens-default.scss
Lines 71 to 74 in 42dfd82
| --pf-t--global--font--line-height--heading: var(--pf-t--global--font--line-height--100); | ||
| --pf-t--global--font--weight--body: var(--pf-t--global--font--weight--body--100); | ||
| // Missing semantic font tokens | ||
| --pf-t--global--font--weight--body--bold: var(--pf-t--global--font--weight--body--200); |
There was a problem hiding this comment.
If we use the font-weights from figma, we can update this
| --pf-t--global--font--weight--body--bold: var(--pf-t--global--font--weight--body--200); | |
| --pf-t--global--font--weight--body--bold: var(--pf-t--global--font--weight--200); |
| // Missing semantic font tokens | ||
| --pf-t--global--font--weight--body--bold: var(--pf-t--global--font--weight--body--200); | ||
| --pf-t--global--font--weight--heading: var(--pf-t--global--font--weight--heading--100); | ||
| --pf-t--global--font--weight--heading--bold: var(--pf-t--global--font--weight--heading--200); |
There was a problem hiding this comment.
And if we use the font-weights from figma, we can update this, too.
| --pf-t--global--font--weight--heading--bold: var(--pf-t--global--font--weight--heading--200); | |
| --pf-t--global--font--weight--heading--bold: var(--pf-t--global--font--weight--400); |
Ah...I think it's because there's a value for Here's how bold is getting nested inside the body/heading IDK if @evwilkin has any knowledge of making the dictionary handle that? Or we add |
|
@mcoker I reassigned those missing bold tokens to the correct base tokens. However, those and the text-decoration tokens are still used in the code instead of the newer ones coming from figma. I'd like to do that as a followup. |
|
🎉 This PR is included in version 6.0.0-alpha.185 🎉 The release is available on: Your semantic-release bot 📦🚀 |


Fixes #6790
Updates font names to match tokens (include spaces)
Also removes font tokens from the local token file since they are now in the default token file from Figma.
Note: There are two local tokens for font weight that are used but not in Figma -
--pf-t--global--font--weight--body--boldand--pf-t--global--font--weight--heading--bold. These point to base tokens that also don't exist. (see diff for details) @lboehling should these semantic font weight tokens exist and should they point to existing base font weigh tokens?