Loading tutorials
@scope rule is designed to reduce. This chapter explains those problems. The later chapters show the fi3 min read@scope (selector) { ... } form from the previous chapter. It covers how the scope root is picked, what it includes, and how to choose a good one.3 min read@scope (.card) limits rules to the part of the DOM under a .card element. Here you will learn how to style the .card element itself.3 min read@scope (.card) rule with a scope root. Here you add the second boundary, the scope limit.3 min read@scope (root) { ... } syntax from earlier chapters. You will learn how to calculate the specificity of a rule inside @scope, where the scope root counts and where it doesn't, and what 3 min read@scope roots work. It covers what happens when two @scope rules match the same element and set the same property.3 min read@scope (root) { ... } with a scope root, how :scope refers to that root, and how CSS nesting works. Here you will use @scope with no root selector, placed in a <style> element inside the markup it styles.4 min read:scope, and specificity inside @scope.3 min read@scope works (scope roots, :scope, scope limits, scope proximity) and that you understand the cascade, specificity, and basic HTML and DOM structure. Here you will compare @scope with three other ways to keep styles from leaking, so you can pick one for a give3 min read@scope syntax with scope roots, scope limits and :scope. It covers what @scope leaves unchanged, so you don't mistake it for a style sandbox.3 min read@scope rules, scope roots, scope limits and :scope work from the earlier chapters. It also assumes you know basic cascade behavior. Here you decide whether to ship @scope today, and how to keep the page usable where it is missing.3 min read