Isolation
Controls whether an element must create a new stacking context.
Widely available
This feature is well established and works across many devices and browser versions.
| Class | Style |
|---|---|
i-auto | isolation: auto; |
i-i | isolation: isolate; |
Auto
Initial value
The element will use the default isolation behavior, allowing overlapping elements to blend together.
<div class="i-auto ..."></div>Isolate
The element will create a new stacking context, preventing overlapping elements from blending with the background.
<div class="i-i ..."></div>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Targeting different viewports
You can combine responsive breakpoints like sm:i-*, md:i-*, lg:i-*, and xxl:i-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:i-* utility to override elements and change their values when hovering over them.