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.

HTML
<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

ClassCSS declarations
isolateisolation: isolate;
isolation-autoisolation: auto;
View full generated CSS
Compiled CSS
.isolate {
  isolation: isolate;
}
.isolation-auto {
  isolation: auto;
}