color
accent-color
Applies accent-color, the property native form controls (checkbox, radio, range, progress) read for their own painted color.
import { accent } from "@sdxc/u/color";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.accent() | css({ accentColor: "var(--ui-brand-bg-solid)" }) |
u.accent("danger") | css({ accentColor: "var(--ui-danger-bg-solid)" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.accent()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.accent())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.accent())Customizing the theme
The custom properties this utility reads, which a theme redefines.
| Variable |
|---|
--ui-brand-bg-solid |
--ui-danger-bg-solid |
Signature
u.accent(value?: ColorValue | (string & {}))