typography
font-variant-numeric
Applies font-variant-numeric: tabular-nums, so digits render at a fixed width instead of their proportional metrics — a running total, countdown, or one-time-code field reads without its layout shifting as digits change.
import { tabularNums } from "@sdxc/u/typography";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.tabularNums() | css({ fontVariantNumeric: "tabular-nums" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.tabularNums()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.tabularNums())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.tabularNums())Signature
u.tabularNums()