sdxc

Type to search, or start from one of these:

color

fill

Applies the SVG fill paint property, resolving semantic tones the same way color does.

import { fill } from "@sdxc/u/color";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.fill()css({ fill: "var(--ui-fg, CanvasText)" })
u.fill("neutral.tint")css({ fill: "var(--ui-neutral-bg-tint)" })
u.fill("brand")css({ fill: "var(--ui-brand-fg)" })
u.fill("none")css({ fill: "none" })

Using a custom value

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

u.fill()

Applying on a state

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

u.hover(u.fill())

Responsive design

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

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

Customizing the theme

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

Variable
--ui-brand-fg
--ui-fg
--ui-neutral-bg-tint

Signature

u.fill(value?: ColorValue | (string & {}))