Skip to content

Commit

Permalink
Correct the element name (#37025)
Browse files Browse the repository at this point in the history
* Update index.md

* Update files/en-us/web/css/@scope/index.md

Co-authored-by: Chris Mills <[email protected]>

---------

Co-authored-by: Chris Mills <[email protected]>
  • Loading branch information
Snoopy1866 and chrisdavidmills authored Dec 3, 2024
1 parent dea4933 commit 4a5b85e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/en-us/web/css/@scope/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ img {

In our CSS, we have two `@scope` blocks:

- The first `@scope` block defines its scope root as elements with a class of `.feature` (in this case, the outer `<div>` only), demonstrating how `@scope` can be used to theme a specific HTML subset.
- The second `@scope` block also defines its scope root as elements with a class of `.feature`, but in addition defines a scope limit of `figure`. This ensures that contained rulesets will only be applied to matching elements within the scope root (`<div class="figure"> ... </div>` in this case) that **are not** nested inside descendant `<figure>` elements. This `@scope` block contains a single ruleset that styles `<img>` elements with a thick black border and a golden background color.
- The first `@scope` block defines its scope root as elements with a class of `.feature` (in this case, the outer `<article>` only), demonstrating how `@scope` can be used to theme a specific HTML subset.
- The second `@scope` block also defines its scope root as elements with a class of `.feature`, but also defines a scope limit of `figure`. This ensures that contained rulesets will only be applied to matching elements within the scope root (`<article class="feature"> ... </article>` in this case) that **are not** nested inside descendant `<figure>` elements. This `@scope` block contains a single ruleset that styles `<img>` elements with a thick black border and a golden background color.

```css
/* Scoped CSS */
Expand Down

0 comments on commit 4a5b85e

Please sign in to comment.