Skip to content

Commit f712750

Browse files
authored
feat(note): sync the ionic theme with the design kit (#31742)
Issue number: internal --------- ## What is the current behavior? The ionic note inherits its line height and letter spacing. ## What is the new behavior? The ionic note matches the info text of a list item in the ionic theme's design kit (`body/md/regular`): - `1.5rem` (24px) line height - `0` letter spacing The 14px font size and regular weight already match. ## Does this introduce a breaking change? - [ ] Yes - [x] No The ionic theme hasn't been released. ## Other information ### Known gaps - The kit's info text color (`#6c727a`) isn't in the palette, so the note keeps its current color. Tracked as a follow-up with the palette generator - Centering the note in the ionic item divider is tracked as a follow-up to sync the item divider ### How to test | Check | Before | After | What to look for | |---|---|---|---| | ionic | [Before](https://ionic-framework-git-fw-6855-md-sync-ionic1.vercel.app/src/components/note/test/basic/index.html?ionic:theme=ionic&ionic:mode=md) | [After](https://ionic-framework-git-fw-6855-ionic-sync-ionic1.vercel.app/src/components/note/test/basic/index.html?ionic:theme=ionic&ionic:mode=md) | Nothing moves. Inspect a note: `line-height` is 24px and `letter-spacing` is 0 | | ionic, large text | Same links | | In devtools, add `font-size: 310%` to `html`. Rows with a note are slightly taller after, because the note's line height scales with the text | Only the ionic font scaling snapshot changes. At 100% the note fits within the item's minimum height, so nothing else moves.
1 parent e432076 commit f712750

4 files changed

Lines changed: 6 additions & 0 deletions

File tree

46 Bytes
Loading
42 Bytes
Loading
48 Bytes
Loading

‎core/src/themes/ionic/default.tokens.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,12 @@ export const defaultTheme: DefaultTheme = {
868868
},
869869
},
870870
},
871+
872+
letterSpacing: '0',
873+
874+
line: {
875+
height: dynamicFont(global.root, 24),
876+
},
871877
},
872878

873879
IonProgressBar: {

0 commit comments

Comments
 (0)