sdxc

Type to search, or start from one of these:

responsive

transparencyReduce

Sugar over media("(prefers-reduced-transparency: reduce)", input).

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

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.transparencyReduce(u.bg())css({ "@media (prefers-reduced-transparency: reduce)": { backgroundColor: "var(--ui-bg, Canvas)" } })

Using a custom value

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

u.transparencyReduce(u.bg())

Applying on a state

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

u.hover(u.transparencyReduce(u.bg()))

Customizing the theme

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

Variable
--ui-bg

Signature

u.transparencyReduce(input: UtilityInput<Node>)