typography
text-align
Applies text-align using the logical start/end keywords so alignment flips automatically under dir="rtl".
import { textAlign } from "@sdxc/u/typography";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.textAlign("end") | css({ textAlign: "end" }) |
u.textAlign("left") | css({ textAlign: "left" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.textAlign("end")Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.textAlign("end"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.textAlign("end"))Signature
u.textAlign(value?: TextAlignValue)