Entry 03
Tabular numbers
Use it on any number that changes or sits in a column, such as prices, tables, timers and counters.
Code
.price,
td,
time { font-variant-numeric: tabular-nums; }Why it works, the rules and the credits
Why it works
- Every digit gets the same width, so columns line up and a ticking value does not shift its neighbors.
Rules
- Do not set it globally. Proportional digits read better in prose.
- The font must ship tabular figures, or nothing changes.
Support
- Chrome
- 52
- Firefox
- 34
- Safari
- 9.1
Credits
Borrowed from: Rauno Freiberg, Web Interface Guidelines · Vercel Web Interface Guidelines