Skip to content

Commit 9b02bfe

Browse files
authored
feat(tokens): add support for dynamic fonts (#31027)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> This pull request updates the design tokens dependency and standardizes font size variables to use `rem` units instead of `px`. It also makes several adjustments to the `package-lock.json` to align dependency versions and peer dependency flags. Dependency updates: * Upgraded the `outsystems-design-tokens` dependency from version `^1.3.4` to `1.3.7` in both `package.json` and `package-lock.json`. [[1]](diffhunk://#diff-7f67769260741e2563407af949f7e54fbf0431d1c607933f6e8a8094e3219e26L71-R71) [[2]](diffhunk://#diff-4ff996db8bece1eded512c3b97a6bde33622f94bb387634ef32496d832d57744L46-R46) [[3]](diffhunk://#diff-4ff996db8bece1eded512c3b97a6bde33622f94bb387634ef32496d832d57744L8648-R8659) Design token improvements: * Changed all font size variables in `ionic.vars.scss` from fixed `px` values to scalable `rem` units, improving accessibility and scalability of font sizing. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. -->
1 parent a877bb7 commit 9b02bfe

3 files changed

Lines changed: 39 additions & 35 deletions

File tree

core/package-lock.json

Lines changed: 26 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"fs-extra": "^9.0.1",
6969
"jest": "^29.7.0",
7070
"jest-cli": "^29.7.0",
71-
"outsystems-design-tokens": "^1.3.4",
71+
"outsystems-design-tokens": "^1.3.7",
7272
"playwright-core": "^1.56.1",
7373
"prettier": "^2.8.8",
7474
"rollup": "^2.26.4",

core/src/foundations/ionic.vars.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -876,18 +876,18 @@ $ion-font-weight-semi-bold: var(--token-font-weight-semi-bold, 600);
876876
$ion-font-weight-bold: var(--token-font-weight-bold, 700);
877877
$ion-font-weight-extra-bold: var(--token-font-weight-extra-bold, 800);
878878
$ion-font-weight-black: var(--token-font-weight-black, 900);
879-
$ion-font-size-275: var(--token-font-size-275, 11px);
880-
$ion-font-size-300: var(--token-font-size-300, 12px);
881-
$ion-font-size-350: var(--token-font-size-350, 14px);
882-
$ion-font-size-400: var(--token-font-size-400, 16px);
883-
$ion-font-size-450: var(--token-font-size-450, 18px);
884-
$ion-font-size-500: var(--token-font-size-500, 20px);
885-
$ion-font-size-550: var(--token-font-size-550, 22px);
886-
$ion-font-size-600: var(--token-font-size-600, 24px);
887-
$ion-font-size-650: var(--token-font-size-650, 26px);
888-
$ion-font-size-700: var(--token-font-size-700, 28px);
889-
$ion-font-size-800: var(--token-font-size-800, 32px);
890-
$ion-font-size-900: var(--token-font-size-900, 36px);
879+
$ion-font-size-275: var(--token-font-size-275, 0.6875rem);
880+
$ion-font-size-300: var(--token-font-size-300, 0.75rem);
881+
$ion-font-size-350: var(--token-font-size-350, 0.875rem);
882+
$ion-font-size-400: var(--token-font-size-400, 1rem);
883+
$ion-font-size-450: var(--token-font-size-450, 1.125rem);
884+
$ion-font-size-500: var(--token-font-size-500, 1.25rem);
885+
$ion-font-size-550: var(--token-font-size-550, 1.375rem);
886+
$ion-font-size-600: var(--token-font-size-600, 1.5rem);
887+
$ion-font-size-650: var(--token-font-size-650, 1.625rem);
888+
$ion-font-size-700: var(--token-font-size-700, 1.75rem);
889+
$ion-font-size-800: var(--token-font-size-800, 2rem);
890+
$ion-font-size-900: var(--token-font-size-900, 2.25rem);
891891
$ion-font-letter-spacing-0: var(--token-font-letter-spacing-0, 0%);
892892
$ion-font-letter-spacing-1: var(--token-font-letter-spacing-1, 1%);
893893
$ion-font-letter-spacing-2: var(--token-font-letter-spacing-2, 1.5%);

0 commit comments

Comments
 (0)