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

New Module: CSS Selectors #28062

Merged
merged 36 commits into from
Jul 21, 2023
Merged

New Module: CSS Selectors #28062

merged 36 commits into from
Jul 21, 2023

Conversation

estelle
Copy link
Member

@estelle estelle commented Jul 19, 2023

New module: CSS selectors
Pseudo elements are in their own module landing page, which will PR soon
fixes: openwebdocs/project#164

Content from the existing page (which had the URL of a module but was not a module) that needed to be kept was not deleted. Rather, it was incorporated into this new page and two sub-pages. The sub pages are live at:

Related PRs:
update case sensitivity of attr (#27528)
Create | namespace separator documentation. (#27580
Update UI pseudo classes tutorial (#27572)
New: Cascade module page (#27588)
two sub pages (#27601)

@estelle estelle requested a review from a team as a code owner July 19, 2023 22:47
@estelle estelle requested review from chrisdavidmills and removed request for a team July 19, 2023 22:47
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Jul 19, 2023
@estelle estelle requested a review from dipikabh July 19, 2023 22:48
@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2023

Preview URLs

Flaws (2)

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/CSS/CSS_selectors
Title: CSS selectors
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/CSS_pseudo
    • Can't resolve /en-US/docs/Web/CSS/CSS_pseudo

(comment last updated: 2023-07-21 00:53:52)

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks, @estelle, for your comprehensive comparison with all the related specs! 🎉

Leaving some questions and suggestions for restructuring and rephrasing. Also leaving a +1 for you to merge after you've fixed what makes sense. We can take a look again in a follow-up PR if anything more needs updating.

files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Show resolved Hide resolved
- {{CSSXref("descendant_combinator", " ")}} ([descendant combinator](/en-US/docs/Web/CSS/Descendant_combinator))
- [`|`](/en-US/docs/Web/CSS/Namespace_separator) ([namespace separator](/en-US/docs/Web/CSS/Namespace_separator))

### Selectors
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Can we name this as Pseudo-class selectors and move the list starting from "Attribute selectors" to a separate section ### Selectors?
  • Also perhaps we can first list ### Selectors (Attribute to Universal bullets) and then ### Pseudo-class selectors
Suggested change
### Selectors
### Pseudo-class selectors

Comment on lines +36 to +37
- {{CSSXref(":current")}}
- {{CSSXref(":current", ":current()")}}
Copy link
Contributor

Choose a reason for hiding this comment

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

these both seem to be the same page so maybe have just one entry?

files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved

**Example:** `p ~ span` will match all {{HTMLElement("span")}} elements that follow a {{HTMLElement("p")}}, immediately or not.
- [Attribute selectors](/en-US/docs/Web/CSS/Attribute_selectors)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have this here, it is not really a guide? We have it covered in the previous list. Also we are not listing other selector types here in the Guides section

**Example:** `col || td` will match all {{HTMLElement("td")}} elements that belong to the scope of the {{HTMLElement("col")}}.

## Pseudo-classes and pseudo-elements
- : Selects elements that have the given attribute, with optional substring values.

- [Pseudo classes](/en-US/docs/Web/CSS/Pseudo-classes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment - do we need to list it here? We have it covered in the previous list

Copy link
Member Author

Choose a reason for hiding this comment

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

kept pseudo and expanded the explaination


- : The `::` pseudo represent entities that are not included in HTML.
- [Using the `:target` pseudo-class in selectors](/en-US/docs/Web/CSS/CSS_selectors/Using_the_:target_pseudo-class_in_selectors)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this to after "CSS selector structure"? That way all of the pages under "CSS_selectors" will be listed together followed by all the Learn guides.

Copy link
Member Author

Choose a reason for hiding this comment

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

if this wasn't so unrelated it would make sense, but I am unclear why target is where it is.

files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/css_selectors/index.md Show resolved Hide resolved
@estelle estelle merged commit 28bd7cc into mdn:main Jul 21, 2023
6 checks passed
@estelle estelle deleted the selectors2 branch August 3, 2023 19:18
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New module landing: CSS Selectors
2 participants