CKTIS / CSS
CSS property `isolation`
`isolation` with isolate forces a new stacking context, keeping descendant blending and z-index ordering inside that context.
Version: CSS modules; captured CSSWG editor index includes draft and obsolete features requiring review
Syntax
auto | isolateisolation with isolate forces a new stacking context, keeping descendant blending and z-index ordering inside that context.
The example overlaps a high-z-index descendant with a sibling and calls elementFromPoint before and after isolate to demonstrate the stacking-context boundary.
The initial value is auto; the property is not inherited. In addition, percentage values do not apply, and the module defines interpolation behavior.
The new context does not change z-index order among its own descendants; it only isolates their comparison with outside elements. auto creates a context only when another rule requires one.
Examples
<!doctype html>
<html lang="en"><meta charset="utf-8"><title>CKTIS CSS reference example</title>
<body><div class="probe">probe</div><pre id="result"></pre><script>
document.body.innerHTML = '<div id="group"><div id="high"></div></div><div id="sibling"></div><pre id="result"></pre>';
const group = document.querySelector("#group");
const high = document.querySelector("#high");
const sibling = document.querySelector("#sibling");
group.style.cssText = "position:absolute;left:0;top:0;width:40px;height:40px";
high.style.cssText = "position:absolute;inset:0;z-index:10";
sibling.style.cssText = "position:absolute;left:0;top:0;width:40px;height:40px;z-index:1";
const before = document.elementFromPoint(20,20).id;
group.style.isolation = "isolate";
const after = document.elementFromPoint(20,20).id;
document.querySelector("#result").textContent = "top=" + before + "->" + after + "; computed=" + getComputedStyle(group).isolation;
</script></body></html>Result
top=high->sibling; computed=isolate
The example was executed locally in an isolated, network-free Chrome session; the result comes from the browser CSS API.