CSS @scope Visualizer
@scope restricts styles to a subtree with an optional "light boundary"
exclusion — but the covered region is invisible. This tool shows the scope root, the
excluded boundary, and which elements match, in a live highlighted preview.
Tool interface
Scope visualization
Scope root Light boundary (excluded) Matched element
Scope rules
CSS (@scope highlighted)
Introduction
@scope solves the "scoped styles" problem without BEM naming or CSS
Modules. But reasoning about the covered region — especially with a light boundary —
is hard. This tool makes it visible.
How it works
- Parses
@scoperoot, boundary, and inner selectors. - Renders your HTML in an isolated Shadow DOM.
- Emulates scope semantics to mark root, exclusions, matches, and non-matches.
- Highlights the
@scopeblock in the CSS view.
Privacy
All rendering and querying is local. No upload, no account, no API key.
Limitations
- Emulation approximates native
@scopefor visualization. - Nested
@scoperules are visualized per-rule, not composed.
FAQ
What is a light boundary?
The to (<selector>) clause stops the scope — matching subtrees are excluded from the scoped styles.
Is my code uploaded?
No. Everything runs locally.