isolation

Defines whether an element must create a new stacking context. This is useful for preventing mix-blend-mode or z-index from affecting elements outside of a specific container.

It is documented as part of the Compositing and Blending specification.

/* Usage Example */
.widget-container {
  isolation: isolate;
  /* prevents children with blend modes from bleeding into the page background */
}

/* Syntax */
isolation: auto;
isolation: isolate;

/* Global values */
isolation: inherit;
isolation: initial;
isolation: revert;
isolation: revert-layer;
isolation: unset;
Widely available Since 2020 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

41+
36+
8+
79+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC