Typography · SU-4
Mixed sizes in one row share a baseline
Flip between the version shibroUI flags and the one it ships. The marks and callouts show what changes.
-
Row alignment
align-items: center
-
Row alignment
align-items: baseline
Monthly recurring revenue
$1,284/ month
Monthly recurring revenue
$1,284/ month
-
Baseline offset from the value
≈7px high
-
Baseline offset from the value
0px
What changes
- Bad
- The “/ month” unit is centred on the
34pxfigure’s box, so its baseline floats about7pxabove the number’s.audit.js: SU-4 warn: text baselines differ by 7px; align-items: baseline - Good
- Same row with
align-items: baseline: the unit sits on the figure’s baseline,0pxapart.
The rules
-
SU-4
Baselines. Align mixed text sizes on their shared baseline, not their centers.