sdxc

Type to search, or start from one of these:

a11y

forced-color-adjust

Applies forced-color-adjust, defaulting to "none" so author colours survive where colour itself carries the information — swatches, chart legends, syntax highlighting.

import { forcedColorAdjust } from "@sdxc/u/a11y";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.forcedColorAdjust()css({ forcedColorAdjust: "none" })
u.forcedColorAdjust("preserve-parent-color")css({ forcedColorAdjust: "preserve-parent-color" })

Using a custom value

Every scale argument also takes a raw CSS value, which passes through untouched.

u.forcedColorAdjust()

Applying on a state

Wrap the call in a state utility to scope it to one selector.

u.hover(u.forcedColorAdjust())

Responsive design

Wrap the call in a container query to scope it to one width.

u.at("md", u.forcedColorAdjust())

Signature

u.forcedColorAdjust(value?: ForcedColorAdjustValue)