general
counter-increment
Applies counter-increment to the element's CSS counter, named by the bare counter identifier name.
import { counterIncrement } from "@sdxc/u/general";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.counterIncrement("section") | css({ counterIncrement: "section" }) |
u.counterIncrement("section", 2) | css({ counterIncrement: "section 2" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.counterIncrement("section")Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.counterIncrement("section"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.counterIncrement("section"))Signature
u.counterIncrement(name: string, value?: number)