-
Notifications
You must be signed in to change notification settings - Fork 23k
Open
Labels
Content:CSSCascading Style Sheets docsCascading Style Sheets docsneeds triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:scope
What specific section or headline is this issue about?
none, this probably would be in a new section
What information was incorrect, unhelpful, or incomplete?
No warnings about using sibling selectors after :scope
What did you expect to see?
If you write a selector like :scope ~ *, the rule will never match
In Firefox, such selectors generate a warning (that will be exposed in the Inspector) :
https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/servo/components/style/error_reporting.rs#285-287
/// `:scope` can have 3 meanings, but in all cases, the relationship is defined strictly by an ancestor-descendant
/// relationship. This means that any presence of sibling selectors to its right would make it never match.
It would be nice to have a section explaining this
Do you have any supporting links, references, or citations?
Firefox bugs that added the warning: https://bugzilla.mozilla.org/show_bug.cgi?id=1882379
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/css/reference/selectors/_colon_scope - MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:scope
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/reference/selectors/_colon_scope/index.md
- Last commit: 28e834c
- Document last modified: 2025-12-09T09:31:49.000Z
Metadata
Metadata
Assignees
Labels
Content:CSSCascading Style Sheets docsCascading Style Sheets docsneeds triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.Triage needed by staff and/or partners. Automatically applied when an issue is opened.