state
focusWithin
Sugar over when("&:focus-within", input).
import { focusWithin } from "@sdxc/u/state";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.focusWithin(u.border("brand")) | css({ "&:focus-within": { borderColor: "..." } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.focusWithin(u.border("brand"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.focusWithin(u.border("brand")))Signature
u.focusWithin(input: UtilityInput<Node>)