stacking
isolation
Creates a new stacking context on the host element while preserving its layout, so a later z-index on this element (or a descendant) stays confined here, isolated from unrelated siblings outside it.
import { isolate } from "@sdxc/u/stacking";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.isolate() | css({ isolation: "isolate" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.isolate()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.isolate())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.isolate())Signature
u.isolate()