Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1 #37336

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Patch 1 #37336

wants to merge 2 commits into from

Conversation

bayesian-intelligence
Copy link

Description

Add more details on @scope boundary behaviour.

Motivation

The default inclusivity / exclusivity behaviour is non-obvious. There is description of it in the MDN page, and no example showing how to invert the selectivity if needed. There is also nothing that explains that a scope limit can be used with an inline @scope.

Additional details

In this revision, the selectivity behaviour is described, and examples given of how to alter the behaviour if needed.

The universal child selector approach is recommended in this WG bug for the lower bound: w3c/csswg-drafts#6577 . It generalises to the upper bound.

Related issues and pull requests

Describes the inclusivity/exclusivity of @scope boundaries, and makes it clear that an inline @scope can be used just with a scope limit.
@bayesian-intelligence bayesian-intelligence requested a review from a team as a code owner December 22, 2024 05:55
@bayesian-intelligence bayesian-intelligence requested review from estelle and removed request for a team December 22, 2024 05:55
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Dec 22, 2024
@@ -34,6 +36,8 @@ The `@scope` at-rule contains one or more rulesets (termed **scoped style rules*
</style>
</parent-element>
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant