general
raw
Wraps a plain style object as a utility mixin, so bespoke declarations — a property outside this package's surface, or a call-site-computed value — compose inside wrappers like when(), whose inputs are utility mixins.
import { raw } from "@sdxc/u/general";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.when('&[data-color="1"]', u.raw({ color: "var(--ui-chart-1)" })) | css({ '&[data-color="1"]': { color: "var(--ui-chart-1)" } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.when('&[data-color="1"]', u.raw({ color: "var(--ui-chart-1)" }))Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.when('&[data-color="1"]', u.raw({ color: "var(--ui-chart-1)" })))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.when('&[data-color="1"]', u.raw({ color: "var(--ui-chart-1)" })))Customizing the theme
The custom properties this utility reads, which a theme redefines.
| Variable |
|---|
--ui-chart-1 |
Signature
u.raw(styles: CSSStyles)