@scope (.outer) to (.inner) {
:scope {
background: yellow;
}
}CSSScopeRule / notebook
CSSScopeRule
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const scopeBlock = document.styleSheets[0].cssRules[0];
console.log(scopeBlock.start); // Returns ".outer"
console.log(scopeBlock.end); // Returns ".inner"