property
Anchor scope — CSS reference
Limits visibility of the listed anchor names to a subtree; all scopes every anchor name. Repeated components can reuse a name without associating with anchors outside their own scope. Here each section contains a separate anchor and note.
Formal Syntax & Structure
css syntaxcss
anchor-scope: --trigger;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>anchor-scope</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#stage{position:relative;width:300px;height:220px}section{anchor-scope:--trigger}#a,#c{position:absolute;top:30px;width:40px;height:25px;padding:0;anchor-name:--trigger;background:#cbd5e1}#a{left:20px}#c{left:170px}#b,#d{position:absolute;position-anchor:--trigger;top:anchor(bottom);left:anchor(left);width:65px;height:30px;background:#2563eb;color:white}</style><body><div id="stage"><section><div id="a">A</div><div id="b">One</div></section><section><div id="c">C</div><div id="d">Two</div></section></div></body></html>