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

feat!: update tier 1 and 2 typography tokens #1969

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .storybook/data/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"eds-typography-preset-002": "var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-primary)",
"eds-typography-preset-002-light": "var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-primary)",
"eds-typography-preset-002-bold": "var(--eds-font-weight-bold) 2rem/1.25 var(--eds-font-family-primary)",
"eds-typography-preset-002-mobile": "var(--eds-font-weight-bold) 1.75rem/1.2857 var(--eds-font-family-primary)",
"eds-typography-preset-003": "var(--eds-font-weight-medium) 1.375rem/1.45454545 var(--eds-font-family-primary)",
"eds-typography-preset-003-light": "var(--eds-font-weight-light) 1.375rem/1.45454545 var(--eds-font-family-primary)",
"eds-typography-preset-003-bold": "var(--eds-font-weight-bold) 1.375rem/1.45454545 var(--eds-font-family-primary)",
"eds-typography-preset-002-mobile": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-primary)",
"eds-typography-preset-003": "var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-primary)",
"eds-typography-preset-003-light": "var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-primary)",
"eds-typography-preset-003-bold": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-primary)",
"eds-typography-preset-003-mobile": "var(--eds-font-weight-bold) 1.25rem/1.4 var(--eds-font-family-primary)",
"eds-typography-preset-004": "var(--eds-font-weight-medium) 1.125rem/1.55555556 var(--eds-font-family-primary)",
"eds-typography-preset-004-light": "var(--eds-font-weight-light) 1.125rem/1.55555556 var(--eds-font-family-primary)",
Expand Down Expand Up @@ -45,12 +45,14 @@
"eds-typography-preset-012": "var(--eds-font-weight-medium) 0.6875rem/1.272727272 var(--eds-font-family-primary)",
"eds-typography-preset-012-light": "var(--eds-font-weight-light) 0.6875rem/1.272727272 var(--eds-font-family-primary)",
"eds-typography-preset-012-bold": "var(--eds-font-weight-bold) 0.6875rem/1.272727272 var(--eds-font-family-primary)",
"eds-typography-preset-secondary-001": "var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-001-light": "var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-001": "var(--eds-font-weight-medium) 2.5rem/1.2 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-001-light": "var(--eds-font-weight-light) 2.5rem/1.2 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-001-bold": "var(--eds-font-weight-bold) 2.5rem/1.2 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-002": "var(--eds-font-weight-medium) 1.75rem/1.28571429 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-002-light": "var(--eds-font-weight-light) 1.75rem/1.28571429 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-003": "var(--eds-font-weight-medium) 1.25rem/1.4 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-003-light": "var(--eds-font-weight-light) 1.25rem/1.4 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-003": "var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-003-light": "var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-003-bold": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-004": "var(--eds-font-weight-medium) 1rem/1.5 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-004-light": "var(--eds-font-weight-light) 1rem/1.5 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-005": "var(--eds-font-weight-medium) 0.875rem/1.57142857 var(--eds-font-family-secondary)",
Expand All @@ -63,8 +65,9 @@
"eds-typography-preset-secondary-008-light": "var(--eds-font-weight-light) 0.75rem/1.33333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-001-light": "var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-001": "var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-002-light": "var(--eds-font-weight-light) 1.75rem/1.28571429 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-002": "var(--eds-font-weight-medium) 1.75rem/1.28571429 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-002-light": "var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-002": "var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-002-bold": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-003-light": "var(--eds-font-weight-light) 1.25rem/1.4 var(--eds-font-family-secondary)",
"eds-typography-preset-secondary-mobile-003": "var(--eds-font-weight-medium) 1.25rem/1.4 var(--eds-font-family-secondary)",
"eds-typography-preset-mobile-001-light": "var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-primary)",
Expand All @@ -90,10 +93,16 @@
"eds-theme-typography-headline-sm-mobile": "var(--eds-typography-preset-mobile-003-light)",
"eds-theme-typography-headline-secondary-lg": "var(--eds-typography-preset-secondary-001-light)",
"eds-theme-typography-headline-secondary-lg-bold": "var(--eds-typography-preset-secondary-001)",
"eds-theme-typography-headline-secondary-lg-bold-mobile": "var(--eds-typography-preset-secondary-mobile-001-bold)",
"eds-theme-typography-headline-secondary-lg-mobile": "var(--eds-typography-preset-secondary-mobile-001-light)",
"eds-theme-typography-headline-secondary-md": "var(--eds-typography-preset-secondary-002-light)",
"eds-theme-typography-headline-secondary-md-bold": "var(--eds-typography-preset-secondary-002)",
"eds-theme-typography-headline-secondary-md-bold-mobile": "var(--eds-typography-secondary-mobile-002-bold)",
"eds-theme-typography-headline-secondary-md-mobile": "var(--eds-typography-preset-mobile-002-light)",
"eds-theme-typography-headline-secondary-sm": "var(--eds-typography-preset-secondary-003-light)",
"eds-theme-typography-headline-secondary-sm-bold": "var(--eds-typography-preset-secondary-003)",
"eds-theme-typography-headline-secondary-sm-bold-mobile": "var(--eds-typography-preset-secondary-mobile-003-bold)",
"eds-theme-typography-headline-secondary-sm-mobile": "var(--eds-typography-preset-secondary-mobile-003-light)",
"eds-theme-typography-title-lg": "var(--eds-typography-preset-004)",
"eds-theme-typography-title-lg-bold": "var(--eds-typography-preset-004-bold)",
"eds-theme-typography-title-md": "var(--eds-typography-preset-004)",
Expand Down
29 changes: 19 additions & 10 deletions src/design-tokens/tier-1-definitions/typography.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@
"value": "var(--eds-font-weight-bold) 2rem/1.25 var(--eds-font-family-primary)"
},
"mobile": {
"value": "var(--eds-font-weight-bold) 1.75rem/1.2857 var(--eds-font-family-primary)",
"value": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-primary)",
"comment": "@deprecated This should not be used in code or design. It will be removed in a future version of EDS."
}
},
"003": {
"@": {
"value": "var(--eds-font-weight-medium) 1.375rem/1.45454545 var(--eds-font-family-primary)"
"value": "var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-primary)"
},
"light": {
"value": "var(--eds-font-weight-light) 1.375rem/1.45454545 var(--eds-font-family-primary)"
"value": "var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-primary)"
},
"bold": {
"value": "var(--eds-font-weight-bold) 1.375rem/1.45454545 var(--eds-font-family-primary)"
"value": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-primary)"
},
"mobile": {
"value": "var(--eds-font-weight-bold) 1.25rem/1.4 var(--eds-font-family-primary)",
Expand Down Expand Up @@ -186,10 +186,13 @@
"secondary": {
"001": {
"@": {
"value": "var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-secondary)"
"value": "var(--eds-font-weight-medium) 2.5rem/1.2 var(--eds-font-family-secondary)"
},
"light": {
"value": "var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-secondary)"
"value": "var(--eds-font-weight-light) 2.5rem/1.2 var(--eds-font-family-secondary)"
},
"bold": {
"value": "var(--eds-font-weight-bold) 2.5rem/1.2 var(--eds-font-family-secondary)"
}
},
"002": {
Expand All @@ -202,10 +205,13 @@
},
"003": {
"@": {
"value": "var(--eds-font-weight-medium) 1.25rem/1.4 var(--eds-font-family-secondary)"
"value": "var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-secondary)"
},
"light": {
"value": "var(--eds-font-weight-light) 1.25rem/1.4 var(--eds-font-family-secondary)"
"value": "var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-secondary)"
},
"bold": {
"value": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-secondary)"
}
},
"004": {
Expand Down Expand Up @@ -259,10 +265,13 @@
},
"002": {
"light": {
"value": "var(--eds-font-weight-light) 1.75rem/1.28571429 var(--eds-font-family-secondary)"
"value": "var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-secondary)"
},
"@": {
"value": "var(--eds-font-weight-medium) 1.75rem/1.28571429 var(--eds-font-family-secondary)"
"value": "var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-secondary)"
},
"bold": {
"value": "var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-secondary)"
}
},
"003": {
Expand Down
30 changes: 27 additions & 3 deletions src/design-tokens/tier-2-usage/typography.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,47 @@
"value": "var(--eds-typography-preset-secondary-001-light)"
},
"bold": {
"value": "var(--eds-typography-preset-secondary-001)"
"@": {
"value": "var(--eds-typography-preset-secondary-001)"
},
"mobile": {
"value": "var(--eds-typography-preset-secondary-mobile-001-bold)"
}
},
"mobile": {
"value": "var(--eds-typography-preset-secondary-mobile-001-light)"
}
},
"md": {
"@": {
"value": "var(--eds-typography-preset-secondary-002-light)"
},
"bold": {
"value": "var(--eds-typography-preset-secondary-002)"
"@": {
"value": "var(--eds-typography-preset-secondary-002)"
},
"mobile": {
"value": "var(--eds-typography-secondary-mobile-002-bold)"
}
},
"mobile": {
"value": "var(--eds-typography-preset-mobile-002-light)"
}
},
"sm": {
"@": {
"value": "var(--eds-typography-preset-secondary-003-light)"
},
"bold": {
"value": "var(--eds-typography-preset-secondary-003)"
"@": {
"value": "var(--eds-typography-preset-secondary-003)"
},
"mobile": {
"value": "var(--eds-typography-preset-secondary-mobile-003-bold)"
}
},
"mobile": {
"value": "var(--eds-typography-preset-secondary-mobile-003-light)"
}
}
}
Expand Down
29 changes: 19 additions & 10 deletions src/tokens-dist/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,16 @@
--eds-theme-typography-title-md: var(--eds-typography-preset-004);
--eds-theme-typography-title-lg-bold: var(--eds-typography-preset-004-bold);
--eds-theme-typography-title-lg: var(--eds-typography-preset-004);
--eds-theme-typography-headline-secondary-sm-mobile: var(--eds-typography-preset-secondary-mobile-003-light);
--eds-theme-typography-headline-secondary-sm-bold-mobile: var(--eds-typography-preset-secondary-mobile-003-bold);
--eds-theme-typography-headline-secondary-sm-bold: var(--eds-typography-preset-secondary-003);
--eds-theme-typography-headline-secondary-sm: var(--eds-typography-preset-secondary-003-light);
--eds-theme-typography-headline-secondary-md-mobile: var(--eds-typography-preset-mobile-002-light);
--eds-theme-typography-headline-secondary-md-bold-mobile: var(--eds-typography-secondary-mobile-002-bold);
--eds-theme-typography-headline-secondary-md-bold: var(--eds-typography-preset-secondary-002);
--eds-theme-typography-headline-secondary-md: var(--eds-typography-preset-secondary-002-light);
--eds-theme-typography-headline-secondary-lg-mobile: var(--eds-typography-preset-secondary-mobile-001-light);
--eds-theme-typography-headline-secondary-lg-bold-mobile: var(--eds-typography-preset-secondary-mobile-001-bold);
--eds-theme-typography-headline-secondary-lg-bold: var(--eds-typography-preset-secondary-001);
--eds-theme-typography-headline-secondary-lg: var(--eds-typography-preset-secondary-001-light);
--eds-theme-typography-headline-sm-mobile: var(--eds-typography-preset-mobile-003-light);
Expand All @@ -343,8 +349,9 @@
--eds-typography-preset-mobile-001-light: var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-primary);
--eds-typography-preset-secondary-mobile-003: var(--eds-font-weight-medium) 1.25rem/1.4 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-003-light: var(--eds-font-weight-light) 1.25rem/1.4 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-002: var(--eds-font-weight-medium) 1.75rem/1.28571429 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-002-light: var(--eds-font-weight-light) 1.75rem/1.28571429 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-002-bold: var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-002: var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-002-light: var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-001: var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-mobile-001-light: var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-008-light: var(--eds-font-weight-light) 0.75rem/1.33333333 var(--eds-font-family-secondary);
Expand All @@ -357,12 +364,14 @@
--eds-typography-preset-secondary-005: var(--eds-font-weight-medium) 0.875rem/1.57142857 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-004-light: var(--eds-font-weight-light) 1rem/1.5 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-004: var(--eds-font-weight-medium) 1rem/1.5 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-003-light: var(--eds-font-weight-light) 1.25rem/1.4 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-003: var(--eds-font-weight-medium) 1.25rem/1.4 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-003-bold: var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-003-light: var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-003: var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-002-light: var(--eds-font-weight-light) 1.75rem/1.28571429 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-002: var(--eds-font-weight-medium) 1.75rem/1.28571429 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-001-light: var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-001: var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-001-bold: var(--eds-font-weight-bold) 2.5rem/1.2 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-001-light: var(--eds-font-weight-light) 2.5rem/1.2 var(--eds-font-family-secondary);
--eds-typography-preset-secondary-001: var(--eds-font-weight-medium) 2.5rem/1.2 var(--eds-font-family-secondary);
--eds-typography-preset-012-bold: var(--eds-font-weight-bold) 0.6875rem/1.272727272 var(--eds-font-family-primary); /* For 012, add a text-transform treatment for uppercase (font-variant is limited to CSS 2.1 values) */
--eds-typography-preset-012-light: var(--eds-font-weight-light) 0.6875rem/1.272727272 var(--eds-font-family-primary); /* For 012, add a text-transform treatment for uppercase (font-variant is limited to CSS 2.1 values) */
--eds-typography-preset-012: var(--eds-font-weight-medium) 0.6875rem/1.272727272 var(--eds-font-family-primary); /* For 012, add a text-transform treatment for uppercase (font-variant is limited to CSS 2.1 values) */
Expand Down Expand Up @@ -391,10 +400,10 @@
--eds-typography-preset-004-light: var(--eds-font-weight-light) 1.125rem/1.55555556 var(--eds-font-family-primary);
--eds-typography-preset-004: var(--eds-font-weight-medium) 1.125rem/1.55555556 var(--eds-font-family-primary);
--eds-typography-preset-003-mobile: var(--eds-font-weight-bold) 1.25rem/1.4 var(--eds-font-family-primary); /* @deprecated This should not be used in code or design. It will be removed in a future version of EDS. */
--eds-typography-preset-003-bold: var(--eds-font-weight-bold) 1.375rem/1.45454545 var(--eds-font-family-primary);
--eds-typography-preset-003-light: var(--eds-font-weight-light) 1.375rem/1.45454545 var(--eds-font-family-primary);
--eds-typography-preset-003: var(--eds-font-weight-medium) 1.375rem/1.45454545 var(--eds-font-family-primary);
--eds-typography-preset-002-mobile: var(--eds-font-weight-bold) 1.75rem/1.2857 var(--eds-font-family-primary); /* @deprecated This should not be used in code or design. It will be removed in a future version of EDS. */
--eds-typography-preset-003-bold: var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-primary);
--eds-typography-preset-003-light: var(--eds-font-weight-light) 1.5rem/1.333333333 var(--eds-font-family-primary);
--eds-typography-preset-003: var(--eds-font-weight-medium) 1.5rem/1.333333333 var(--eds-font-family-primary);
--eds-typography-preset-002-mobile: var(--eds-font-weight-bold) 1.5rem/1.333333333 var(--eds-font-family-primary); /* @deprecated This should not be used in code or design. It will be removed in a future version of EDS. */
--eds-typography-preset-002-bold: var(--eds-font-weight-bold) 2rem/1.25 var(--eds-font-family-primary);
--eds-typography-preset-002-light: var(--eds-font-weight-light) 2rem/1.25 var(--eds-font-family-primary);
--eds-typography-preset-002: var(--eds-font-weight-medium) 2rem/1.25 var(--eds-font-family-primary);
Expand Down
Loading
Loading