Browse documentation
Reference / Layout
Isolation
Start a stacking context for a component so its positioned artwork and blending layers stay grouped.
Working example
Here the negative-index tint paints behind the heading and stays inside the card’s stacking context.
<article class="relative isolate border p-4">
<div aria-hidden="true" class="absolute inset-y-0 left-0 -z-10 w-1/2 bg-neutral-200"></div>
<h3 class="font-bold">Half-tone study</h3>
</article>Class reference
| Class | CSS declarations |
|---|---|
isolate | isolation: isolate; |
isolation-auto | isolation: auto; |
View full generated CSS
.isolate {
isolation: isolate;
}
.isolation-auto {
isolation: auto;
}