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!: Change naming approach of all typography tokens #1845

Closed
Closed
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
40c7fa2
Introduce actually primitive brand typography tokens
VincentSmedinga Nov 21, 2024
5886458
Model heading and body scales in common tokens
VincentSmedinga Nov 21, 2024
331325d
Apply new typography tokens to all components
VincentSmedinga Nov 21, 2024
25a8923
Remove unnecessary extra logging config
VincentSmedinga Nov 22, 2024
9ec050b
Rename token in stylesheet
VincentSmedinga Nov 22, 2024
214f7b0
Add new compact tokens
VincentSmedinga Nov 22, 2024
a351a31
Remove obsolete text tokens
VincentSmedinga Nov 22, 2024
00de72a
Choose 2xl line height for xl body text
VincentSmedinga Nov 26, 2024
ce3f12f
Rename documentation page
VincentSmedinga Nov 26, 2024
545756c
WIP Update documentation
VincentSmedinga Nov 26, 2024
d87c070
Update tokens for recent components
VincentSmedinga Feb 1, 2025
c9de0fb
Update examples and alignment in docs
VincentSmedinga Feb 1, 2025
3f48741
Remove ‘brand’ from typography token names
VincentSmedinga Feb 1, 2025
5325582
Remove ‘common’ from typography token names
VincentSmedinga Feb 1, 2025
0e5d04b
Rename token in stylesheet again
VincentSmedinga Feb 1, 2025
68fcac7
Add more token overviews to docs
VincentSmedinga Feb 3, 2025
19a55d4
Merge branch 'develop' into feat/DES-1073-typography-tokens
VincentSmedinga Feb 12, 2025
ed970ba
Use primitive values in common tokens
VincentSmedinga Feb 12, 2025
0fea502
Remove old organisation of typography tokens
VincentSmedinga Feb 12, 2025
3b5f042
Promote common tokens to brand level
VincentSmedinga Feb 12, 2025
bb8c975
Remove ‘level’ from heading tokens
VincentSmedinga Feb 12, 2025
e1c42cc
Merge branch 'develop' into feat/DES-1073-typography-tokens
VincentSmedinga Feb 12, 2025
986d9c4
Restore old line heights for now
VincentSmedinga Feb 12, 2025
d8413cf
Update common typography tokens
VincentSmedinga Feb 12, 2025
e854fec
Fix common typography tokens
VincentSmedinga Feb 12, 2025
ba14501
Add missing token for button font weight
VincentSmedinga Feb 12, 2025
65c28c4
Share font family token between groups
VincentSmedinga Feb 12, 2025
2474f37
Remove unused font family token in Switch
VincentSmedinga Feb 12, 2025
27b50d6
Fix token names in heading stylesheet
VincentSmedinga Feb 12, 2025
29dd1da
Merge font family sections in docs
VincentSmedinga Feb 12, 2025
85c79aa
Only abbreviate ‘extra’ in t-shirt sizes
VincentSmedinga Feb 14, 2025
03d8687
Fix renamed token
VincentSmedinga Feb 14, 2025
3674430
Use extra bold for body text as well
VincentSmedinga Feb 14, 2025
b1b69ec
Separate body text and headings in Icon size prop
VincentSmedinga Feb 14, 2025
0d50988
Add examples of Heading and Paragraph with Icon
VincentSmedinga Feb 18, 2025
b596b28
Merge branch 'develop' into feat/DES-1073-typography-tokens
VincentSmedinga Feb 18, 2025
664a863
Update links to typography docs
VincentSmedinga Feb 19, 2025
a4e95a8
Fix typo
VincentSmedinga Feb 21, 2025
59175b2
Remove ‘body-text’ group to indicate it as default
VincentSmedinga Feb 20, 2025
e62c6bd
Move modifiers to end of token names
VincentSmedinga Feb 20, 2025
8ccca01
Make heading tokens variations of size
VincentSmedinga Feb 20, 2025
17870f2
Codify reuse of token values
VincentSmedinga Feb 20, 2025
2498212
Handle font weight tokens consistently
VincentSmedinga Feb 20, 2025
9b47a8f
Remove verbose typography grouping
VincentSmedinga Feb 20, 2025
c694f54
Handle font family tokens consistently
VincentSmedinga Feb 20, 2025
98e9669
Reorganize documentation
VincentSmedinga Feb 20, 2025
aa266c5
WIP Move Heading tokens into Common layer
VincentSmedinga Feb 21, 2025
5c72189
Merge branch 'develop' into feat/DES-1073-typography-tokens
VincentSmedinga Feb 25, 2025
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
3 changes: 0 additions & 3 deletions proprietary/tokens/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ defaultMode.buildAllPlatforms()

modes.map((mode) => {
const styleDictionary = new StyleDictionary({
log: {
verbosity: 'verbose',
},
platforms: generateSharedConfig(mode),
source: [`./src/**/*.${mode}.tokens.json`],
})
Expand Down
29 changes: 0 additions & 29 deletions proprietary/tokens/src/brand/ams/text.compact.tokens.json

This file was deleted.

41 changes: 0 additions & 41 deletions proprietary/tokens/src/brand/ams/text.tokens.json

This file was deleted.

15 changes: 15 additions & 0 deletions proprietary/tokens/src/brand/ams/typography.compact.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ams": {
"typography": {
"font-size": {
"sm": { "value": "clamp(0.8889rem, calc(0.9141rem + -0.0253vw), 0.9091rem)" },
"md": { "value": "1rem" },
"lg": { "value": "clamp(1.1rem, calc(1.0938rem + 0.0313vw), 1.125rem)" },
"xl": { "value": "clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem)" },
"2xl": { "value": "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)" },
"3xl": { "value": "clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem)" },
"4xl": { "value": "clamp(1.6105rem, calc(1.5626rem + 0.2394vw), 1.802rem)" }
}
}
}
}
37 changes: 37 additions & 0 deletions proprietary/tokens/src/brand/ams/typography.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"ams": {
"typography": {
"font-family": {
"body-text": { "value": "'Amsterdam Sans', Arial, sans-serif" },
"headings": { "value": "'Amsterdam Sans', Arial, sans-serif" },
"monospace": { "value": "monospace" }
},
"font-size": {
"sm": { "value": "clamp(0.9643rem, calc(0.9054rem + 0.2946vw), 1.2rem)" },
"md": { "value": "clamp(1.125rem, calc(1.0313rem + 0.4688vw), 1.5rem)" },
"lg": { "value": "clamp(1.3125rem, calc(1.1719rem + 0.7031vw), 1.875rem)" },
"xl": { "value": "clamp(1.5313rem, calc(1.3281rem + 1.0156vw), 2.3438rem)" },
"2xl": { "value": "clamp(1.7865rem, calc(1.5007rem + 1.429vw), 2.9297rem)" },
"3xl": { "value": "clamp(2.0842rem, calc(1.6897rem + 1.9724vw), 3.6621rem)" },
"4xl": { "value": "clamp(2.4316rem, calc(1.8951rem + 2.6826vw), 4.5776rem)" }
},
"font-weight": {
"light": { "value": 300 },
"normal": { "value": 400 },
"bold": { "value": 700 },
"x-bold": { "value": 800 }
},
"line-height": {
"5xs": { "value": "113.86%" },
"4xs": { "value": "117.54%" },
"3xs": { "value": "121.33%" },
"2xs": { "value": "125.24%" },
"xs": { "value": "129.28%" },
"sm": { "value": "133.45%" },
"md": { "value": "137.76%" },
"2xl": { "value": "151.52%" },
"5xl": { "value": "166.67%" }
}
}
}
}
25 changes: 25 additions & 0 deletions proprietary/tokens/src/common/ams/body-text.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"ams": {
"body-text": {
"font-family": { "value": "{ams.typography.font-family.body-text}" },
"font-size": { "value": "{ams.typography.font-size.md}" },
"font-weight": { "value": "{ams.typography.font-weight.normal}" },
"line-height": { "value": "{ams.typography.line-height.5xl}" },
"sm": {
"font-size": { "value": "{ams.typography.font-size.sm}" },
"line-height": { "value": "{ams.typography.line-height.2xl}" }
},
"lg": {
"font-size": { "value": "{ams.typography.font-size.lg}" },
"line-height": { "value": "{ams.typography.line-height.2xl}" }
},
"xl": {
"font-size": { "value": "{ams.typography.font-size.xl}" },
"line-height": { "value": "{ams.typography.line-height.2xl}" }
},
"bold": {
"font-weight": { "value": "{ams.typography.font-weight.bold}" }
}
}
}
}
36 changes: 36 additions & 0 deletions proprietary/tokens/src/common/ams/headings.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"ams": {
"headings": {
"font-family": { "value": "{ams.typography.font-family.headings}" },
"font-weight": { "value": "{ams.typography.font-weight.x-bold}" },
"level-0": {
"font-size": { "value": "{ams.typography.font-size.4xl}" },
"line-height": { "value": "{ams.typography.line-height.5xs}" }
},
"level-1": {
"font-size": { "value": "{ams.typography.font-size.3xl}" },
"line-height": { "value": "{ams.typography.line-height.4xs}" }
},
"level-2": {
"font-size": { "value": "{ams.typography.font-size.2xl}" },
"line-height": { "value": "{ams.typography.line-height.3xs}" }
},
"level-3": {
"font-size": { "value": "{ams.typography.font-size.xl}" },
"line-height": { "value": "{ams.typography.line-height.2xs}" }
},
"level-4": {
"font-size": { "value": "{ams.typography.font-size.lg}" },
"line-height": { "value": "{ams.typography.line-height.xs}" }
},
"level-5": {
"font-size": { "value": "{ams.typography.font-size.md}" },
"line-height": { "value": "{ams.typography.line-height.sm}" }
},
"level-6": {
"font-size": { "value": "{ams.typography.font-size.sm}" },
"line-height": { "value": "{ams.typography.line-height.md}" }
}
}
}
}
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/accordion.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"gap": { "value": "{ams.space.md}" },
"button": {
"color": { "value": "{ams.color.interactive.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"font-family": { "value": "{ams.headings.font-family}" },
"font-size": { "value": "{ams.headings.level-5.font-size}" },
"font-weight": { "value": "{ams.headings.font-weight}" },
"gap": { "value": "{ams.space.sm}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"line-height": { "value": "{ams.headings.level-5.line-height}" },
"padding-block": { "value": "{ams.space.sm}" },
"padding-inline": { "value": "0" },
"focus": {
Expand Down
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/avatar.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"aspect-ratio": { "value": "{ams.aspect-ratio.square}" },
"background-color": { "value": "{ams.color.highlight.purple}" },
"color": { "value": "{ams.color.text.inverse}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.sm.line-height}" },
"padding-block": { "value": "{ams.space.xs}" },
"padding-inline": { "value": "{ams.space.xs}" },
"dark-green": {
Expand Down
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/badge.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"badge": {
"background-color": { "value": "{ams.color.highlight.green}" },
"color": { "value": "{ams.color.text.inverse}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"font-weight": { "value": "{ams.body-text.bold.font-weight}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"padding-inline": { "value": "{ams.space.xs}" },
"green": {
"background-color": { "value": "{ams.color.highlight.lime}" },
Expand Down
10 changes: 5 additions & 5 deletions proprietary/tokens/src/components/ams/blockquote.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"ams": {
"blockquote": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.3.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"line-height": { "value": "{ams.text.level.3.line-height}" },
"inverse-color": { "value": "{ams.color.text.inverse}" }
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.xl.font-size}" },
"font-weight": { "value": "{ams.body-text.bold.font-weight}" },
"inverse-color": { "value": "{ams.color.text.inverse}" },
"line-height": { "value": "{ams.body-text.xl.line-height}" }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"ams": {
"breadcrumb": {
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.sm.line-height}" },
"separator": {
"background-image": {
"value": "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23000000' fill-rule='evenodd' d='m9.757 32-2.9-2.91L19.937 16 6.857 2.91 9.757 0l16 16z'/></svg>\")"
Expand Down
6 changes: 3 additions & 3 deletions proprietary/tokens/src/components/ams/button.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"ams": {
"button": {
"cursor": { "value": "{ams.action.activate.cursor}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"gap": { "value": "{ams.space.sm}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"padding-block": { "value": "{ams.space.sm}" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"ams": {
"character-count": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.sm.line-height}" },
"error": {
"color": { "value": "{ams.color.feedback.error}" }
}
Expand Down
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/checkbox.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"ams": {
"checkbox": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"gap": { "value": "{ams.space.sm}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"checkmark": {
"border-color": { "value": "{ams.color.interactive.default}" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"background-color": { "value": "{ams.color.background}" },
"box-shadow": { "value": "inset 0 0 0 {ams.border.width.sm} {ams.color.interactive.secondary}" },
"color": { "value": "{ams.color.text.default}" },
"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}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"padding-block": { "value": "{ams.space.sm}" },
"padding-inline": { "value": "{ams.space.md}" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"description-list": {
"color": { "value": "{ams.color.text.default}" },
"column-gap": { "value": "{ams.space.lg}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"inverse-color": { "value": "{ams.color.text.inverse}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"row-gap": { "value": "{ams.space.sm}" },
"term": {
"font-weight": { "value": "{ams.text.font-weight.bold}" }
"font-weight": { "value": "{ams.body-text.bold.font-weight}" }
},
"description": {
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"padding-inline-start": { "value": "{ams.space.lg}" }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"ams": {
"error-message": {
"color": { "value": "{ams.color.feedback.error}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"gap": { "value": "{ams.space.xs}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
"line-height": { "value": "{ams.body-text.sm.line-height}" }
}
}
}
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/field-set.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
},
"legend": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.4.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"line-height": { "value": "{ams.text.level.4.line-height}" },
"font-family": { "value": "{ams.headings.font-family}" },
"font-size": { "value": "{ams.headings.level-4.font-size}" },
"font-weight": { "value": "{ams.headings.font-weight}" },
"line-height": { "value": "{ams.headings.level-4.line-height}" },
"margin-block-end": { "value": "{ams.space.md}" }
}
}
Expand Down
Loading