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