Skip to content

Commit

Permalink
Flatten design tokens for default text size
Browse files Browse the repository at this point in the history
The `medium` font-size and line-height are the default for Paragraph and Link List Link. The absence of a corresponding option for the `size` prop reflects this, and so should the names of their design tokens.
  • Loading branch information
VincentSmedinga committed May 7, 2024
1 parent 0e77bd6 commit 1bb25a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/css/src/components/link-list/link-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
color: var(--ams-link-list-link-color);
display: inline-flex;
font-family: var(--ams-link-list-link-font-family);
font-size: var(--ams-link-list-link-medium-font-size);
font-size: var(--ams-link-list-link-font-size);
font-weight: var(--ams-link-list-link-font-weight);
gap: var(--ams-link-list-link-gap);
line-height: var(--ams-link-list-link-medium-line-height);
line-height: var(--ams-link-list-link-line-height);
outline-offset: var(--ams-link-list-link-outline-offset);
text-decoration-line: var(--ams-link-list-link-text-decoration-line);
text-decoration-thickness: var(--ams-link-list-link-text-decoration-thickness);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/paragraph/paragraph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
.ams-paragraph {
color: var(--ams-paragraph-color);
font-family: var(--ams-paragraph-font-family);
font-size: var(--ams-paragraph-medium-font-size);
font-size: var(--ams-paragraph-font-size);
font-weight: var(--ams-paragraph-font-weight);
line-height: var(--ams-paragraph-medium-line-height);
line-height: var(--ams-paragraph-line-height);

@include text-rendering;
@include reset;
Expand Down
6 changes: 2 additions & 4 deletions proprietary/tokens/src/components/ams/link-list.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"link": {
"color": { "value": "{ams.link-appearance.color}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"gap": { "value": "0.5em" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"text-decoration-line": { "value": "{ams.link-appearance.subtle.text-decoration-line}" },
"text-decoration-thickness": { "value": "{ams.link-appearance.text-decoration-thickness}" },
Expand All @@ -15,10 +17,6 @@
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
},
"medium": {
"font-size": { "value": "{ams.text.level.5.font-size}" },
"line-height": { "value": "{ams.text.level.5.line-height}" }
},
"large": {
"font-size": { "value": "{ams.text.level.4.font-size}" },
"line-height": { "value": "{ams.text.level.4.line-height}" }
Expand Down
6 changes: 2 additions & 4 deletions proprietary/tokens/src/components/ams/paragraph.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
"paragraph": {
"color": { "value": "{ams.color.primary-black}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
},
"medium": {
"font-size": { "value": "{ams.text.level.5.font-size}" },
"line-height": { "value": "{ams.text.level.5.line-height}" }
},
"large": {
"font-size": { "value": "{ams.text.level.4.font-size}" },
"line-height": { "value": "{ams.text.level.4.line-height}" }
Expand Down

0 comments on commit 1bb25a1

Please sign in to comment.