sdxc

Type to search, or start from one of these:

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.

CallCSS
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>)