:scope { order: 1; } @scope (.foo) { :scope { order: 2; } } @media screen { :scope { order: 3; } } :has(.foo > :scope + .bar) { order: 3; } :has(.foo > :not(:scope) + .bar) { order: 4; } :scope { to-clone: 1; }