Improve :has() pseudo-class documentation
Description
This PR improves the documentation of the :has() page and updates the documentation of a few other pages where related terms appear. Here's a summary of these changes:
-
:has()pseudo-class page (https://developer.mozilla.org/en-US/docs/Web/CSS/:has)
- Improves the description and adds link to the definition of the term "forgiving selector list"
- Adds three examples to showcase different scenarios for using
:has()
- CSS selectors page (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)
- Improves the formatting on the page so that "Syntax" and "Examples" for the different type of selectors appear on newlines
- Adds the section "## Structure of a selector" to define the terms simple selectors, compound selectors, complex selectors, relative selectors, and selector lists
-
Pseudo-class page (https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) - includes minor language improvements
-
Selector list page (https://developer.mozilla.org/en-US/docs/Web/CSS/Selector_list)
- Explains the terms "forgiving selector list" and "forgiving relative selector list"
Additional details
https://drafts.csswg.org/selectors/#relational
Related issues and pull requests
Fixes #19972
Preview URLs
- /en-US/docs/Web/CSS/:has
- /en-US/docs/Web/CSS/CSS_Selectors
- /en-US/docs/Web/CSS/Pseudo-classes
- /en-US/docs/Web/CSS/Selector_list
Flaws (8)
Note! 2 documents with no flaws that don't need to be listed. 🎉
URL: /en-US/docs/Web/CSS/Pseudo-classes
Title: Pseudo-classes
Flaw count: 7
-
macros:
-
/en-US/docs/Web/CSS/:dir() redirects to /en-US/docs/Web/CSS/:dir -
/en-US/docs/Web/CSS/:lang() redirects to /en-US/docs/Web/CSS/:lang -
wrong xref macro used (consider changing which macro you use) -
wrong xref macro used (consider changing which macro you use) -
wrong xref macro used (consider changing which macro you use) - and 2 more flaws omitted
-
URL: /en-US/docs/Web/CSS/CSS_Selectors
Title: CSS selectors
Flaw count: 1
-
macros:
-
/en-US/docs/Web/HTML/Element/h2 redirects to /en-US/docs/Web/HTML/Element/Heading_Elements
-
External URLs (1)
URL: /en-US/docs/Web/CSS/:has
Title: :has()
- https://drafts.csswg.org/selectors-4/ (1 time) (Note! This may be a new URL 👀)
(this comment was updated 2022-10-04 16:27:26.276179)
Hi @estelle, we can probably land this now and make more iterations in future PRs. Thank you!