sdxc

Type to search, or start from one of these:

responsive

contrastMore

Sugar over media("(prefers-contrast: more)", input).

import { contrastMore } from "@sdxc/u/responsive";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.contrastMore(u.fg("neutral.emphasis"))css({ "@media (prefers-contrast: more)": { color: "var(--ui-neutral-fg-emphasis)" } })

Using a custom value

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

u.contrastMore(u.fg("neutral.emphasis"))

Applying on a state

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

u.hover(u.contrastMore(u.fg("neutral.emphasis")))

Customizing the theme

The custom properties this utility reads, which a theme redefines.

Variable
--ui-neutral-fg-emphasis

Signature

u.contrastMore(input: UtilityInput<Node>)