shibro
Show the version of “Mixed sizes in one row share a baseline”

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
  • Baseline offset from the value ≈7px high
  • Baseline offset from the value 0px

What changes

Bad
The “/ month” unit is centred on the 34px figure’s box, so its baseline floats about 7px above 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, 0px apart.

The rules

  • SU-4

    Baselines. Align mixed text sizes on their shared baseline, not their centers.