typography
text-wrap
Balances line lengths across a wrapped block, best suited to short text such as headings, since browsers cap balancing to a small number of lines.
import { balance } from "@sdxc/u/typography";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.balance() | css({ textWrap: "balance" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.balance()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.balance())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.balance())Signature
u.balance()