effects
text-shadow
Applies text-shadow, tracing the glyph forms themselves.
import { textShadow } from "@sdxc/u/effects";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.textShadow() | css({ textShadow: "calc(var(--ui-spacing, 0.25rem) * 0) calc(var(--ui-spacing, 0.25rem) * 1) calc(var(--ui-spacing, 0.25rem) * 2) rgb(0 0 0 / 0.35)" }) |
u.textShadow({ y: "1px", blur: "3px", color: "brand" }) | css({ textShadow: "calc(var(--ui-spacing, 0.25rem) * 0) 1px 3px var(--ui-brand-border)" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.textShadow()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.textShadow())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.textShadow())Customizing the theme
The custom properties this utility reads, which a theme redefines.
| Variable |
|---|
--ui-brand-border |
--ui-spacing |
Signature
u.textShadow(options?: TextShadowOptions)