state
placeholderShown
Sugar over when("&:placeholder-shown", input), matching an input or textarea while it is empty and therefore still showing its placeholder.
import { placeholderShown } from "@sdxc/u/state";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.placeholderShown(u.fg("neutral.muted")) | css({ "&:placeholder-shown": { color: "..." } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.placeholderShown(u.fg("neutral.muted"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.placeholderShown(u.fg("neutral.muted")))Signature
u.placeholderShown(input: UtilityInput<Node>)