color
fill-opacity
Sets the SVG fill-opacity paint property.
import { fillOpacity } from "@sdxc/u/color";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.fillOpacity(50) | css({ fillOpacity: "0.5" }) |
u.fillOpacity("var(--chart-fill-opacity)") | css({ fillOpacity: "var(--chart-fill-opacity)" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.fillOpacity("2.75rem")Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.fillOpacity(50))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.fillOpacity(50))Signature
u.fillOpacity(value: number | (string & {}))