responsive
forcedColors
Sugar over media("(forced-colors: active)", input).
import { forcedColors } from "@sdxc/u/responsive";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.forcedColors(u.forcedColorAdjust("none")) | css({ "@media (forced-colors: active)": { forcedColorAdjust: "none" } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.forcedColors(u.forcedColorAdjust("none"))Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.forcedColors(u.forcedColorAdjust("none")))Signature
u.forcedColors(input: UtilityInput<Node>)