Skip to content

Commit

Permalink
feat(Typography): add typography-overline-lg (#1993)
Browse files Browse the repository at this point in the history
- also mark of the non-sized token as deprecated
  • Loading branch information
booc0mtaco authored Jun 13, 2024
1 parent c3ce70f commit 36eb3c9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .storybook/data/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"eds-theme-typography-caption-sm": "var(--eds-typography-preset-010-light)",
"eds-theme-typography-caption-sm-bold": "var(--eds-typography-preset-010)",
"eds-theme-typography-overline": "var(--eds-typography-preset-011)",
"eds-theme-typography-overline-lg": "var(--eds-typography-preset-005)",
"eds-theme-typography-overline-md": "var(--eds-typography-preset-011)",
"eds-theme-typography-overline-sm": "var(--eds-typography-preset-012)",
"eds-theme-typography-callout": "var(--eds-typography-preset-002-light)",
Expand Down
5 changes: 5 additions & 0 deletions src/components/Text/Text.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,14 @@
font: var(--eds-theme-typography-caption-sm-bold);
}
.text--overline {
/* @deprecated This should not be used in code or design. It will be removed in a future version of EDS." */
font: var(--eds-theme-typography-overline);
text-transform: uppercase;
}
.text--overline-lg {
font: var(--eds-theme-typography-overline-lg);
text-transform: uppercase;
}
.text--overline-md {
font: var(--eds-theme-typography-overline-md);
text-transform: uppercase;
Expand Down
3 changes: 3 additions & 0 deletions src/design-tokens/tier-2-usage/typography.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@
"value": "var(--eds-typography-preset-011)",
"comment": "@deprecated This should not be used in code or design. It will be removed in a future version of EDS."
},
"lg": {
"value": "var(--eds-typography-preset-005)"
},
"md": {
"value": "var(--eds-typography-preset-011)"
},
Expand Down
1 change: 1 addition & 0 deletions src/tokens-dist/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
--eds-theme-typography-callout: var(--eds-typography-preset-002-light);
--eds-theme-typography-overline-sm: var(--eds-typography-preset-012);
--eds-theme-typography-overline-md: var(--eds-typography-preset-011);
--eds-theme-typography-overline-lg: var(--eds-typography-preset-005);
--eds-theme-typography-overline: var(--eds-typography-preset-011); /* @deprecated This should not be used in code or design. It will be removed in a future version of EDS. */
--eds-theme-typography-caption-sm-bold: var(--eds-typography-preset-010);
--eds-theme-typography-caption-sm: var(--eds-typography-preset-010-light);
Expand Down
1 change: 1 addition & 0 deletions src/tokens-dist/json/variables-nested.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
},
"overline": {
"@": "var(--eds-typography-preset-011)",
"lg": "var(--eds-typography-preset-005)",
"md": "var(--eds-typography-preset-011)",
"sm": "var(--eds-typography-preset-012)"
},
Expand Down
3 changes: 2 additions & 1 deletion src/util/variant-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export const presets = [
'caption-md-bold',
'caption-sm',
'caption-sm-bold',
'overline',
'overline', // @deprecated This should not be used in code or design. It will be removed in a future version of EDS."
'overline-lg',
'overline-md',
'overline-sm',
'callout',
Expand Down

0 comments on commit 36eb3c9

Please sign in to comment.