From 2e02f263bcec1d26d2719c1d0a5a477a9b58fc72 Mon Sep 17 00:00:00 2001 From: at-susie Date: Thu, 19 Nov 2026 18:52:36 +0100 Subject: [PATCH] chore: Adjust letter-spacing in one-theme --- src/internal/styles/typography/mixins.scss | 1 + style-dictionary/one-theme/typography.ts | 7 +++++++ style-dictionary/utils/token-names.ts | 1 + style-dictionary/visual-refresh/metadata/typography.ts | 5 +++++ style-dictionary/visual-refresh/typography.ts | 1 + 5 files changed, 15 insertions(+) diff --git a/src/internal/styles/typography/mixins.scss b/src/internal/styles/typography/mixins.scss index 4e660cd9147..1349ea58d31 100644 --- a/src/internal/styles/typography/mixins.scss +++ b/src/internal/styles/typography/mixins.scss @@ -28,6 +28,7 @@ @mixin font-body-m { font-size: awsui.$font-size-body-m; line-height: awsui.$line-height-body-m; + letter-spacing: awsui.$letter-spacing-body-m; } @mixin font-heading-xs($weight: true, $family: true) { diff --git a/style-dictionary/one-theme/typography.ts b/style-dictionary/one-theme/typography.ts index a318ee4bf29..7e1d2007cb5 100644 --- a/style-dictionary/one-theme/typography.ts +++ b/style-dictionary/one-theme/typography.ts @@ -12,22 +12,27 @@ const tokens: StyleDictionary.DensityTypographyDictionary = { fontSizeHeadingXl: '24px', lineHeightHeadingXl: '30px', fontWeightHeadingXl: '500', + letterSpacingHeadingXl: '-0.015em', fontSizeHeadingL: '20px', lineHeightHeadingL: '24px', fontWeightHeadingL: '500', + letterSpacingHeadingL: '-0.01em', fontSizeHeadingM: '18px', lineHeightHeadingM: '22px', fontWeightHeadingM: '500', + letterSpacingHeadingM: '-0.005em', fontSizeHeadingS: '16px', lineHeightHeadingS: '20px', fontWeightHeadingS: '500', + letterSpacingHeadingS: 'normal', fontSizeHeadingXs: '14px', lineHeightHeadingXs: '20px', fontWeightHeadingXs: '500', + letterSpacingHeadingXs: '0.005em', fontWeightDisplayL: '500', fontWeightDisplayXl: '400', @@ -51,6 +56,8 @@ const tokens: StyleDictionary.DensityTypographyDictionary = { // ── Body text ───────────────────────────────────────────────────────────── fontWeightBold: '600', + letterSpacingBodyM: '0.005em', + letterSpacingBodyS: '0.01em', // ── Key-value pairs ─────────────────────────────────────────────────────── fontWeightKeyValuePairsLabel: '400', diff --git a/style-dictionary/utils/token-names.ts b/style-dictionary/utils/token-names.ts index 569e16e0094..2cd42e1dfad 100644 --- a/style-dictionary/utils/token-names.ts +++ b/style-dictionary/utils/token-names.ts @@ -1018,6 +1018,7 @@ export type TypographyTokenName = | 'fontWeightNormal' | 'fontWeightTabs' | 'fontWeightTabsDisabled' + | 'letterSpacingBodyM' | 'letterSpacingBodyS' | 'letterSpacingDisplayL' | 'letterSpacingDisplayXl' diff --git a/style-dictionary/visual-refresh/metadata/typography.ts b/style-dictionary/visual-refresh/metadata/typography.ts index 8ca3022ce40..83f3ed7ddcd 100644 --- a/style-dictionary/visual-refresh/metadata/typography.ts +++ b/style-dictionary/visual-refresh/metadata/typography.ts @@ -164,6 +164,11 @@ const metadata: StyleDictionary.MetadataIndex = { themeable: true, public: true, }, + letterSpacingBodyM: { + description: 'The default letter spacing for regular body text.', + themeable: true, + public: true, + }, letterSpacingBodyS: { description: 'The default letter spacing for small body text.', }, diff --git a/style-dictionary/visual-refresh/typography.ts b/style-dictionary/visual-refresh/typography.ts index 7bc260769d1..62ae8d2b614 100644 --- a/style-dictionary/visual-refresh/typography.ts +++ b/style-dictionary/visual-refresh/typography.ts @@ -60,6 +60,7 @@ export const tokens: StyleDictionary.TypographyDictionary = { fontWeightNormal: '400', fontWeightTabs: '700', fontWeightTabsDisabled: '{fontWayfindingLinkActiveWeight}', + letterSpacingBodyM: 'normal', letterSpacingBodyS: '0.005em', letterSpacingDisplayL: '-0.03em', letterSpacingDisplayXl: '-0.03em',