mdn / sprints

Archived: MDN Web Docs issues are tracked in the content repository.
https://github.com/mdn/content
Creative Commons Zero v1.0 Universal
150 stars 142 forks source link

[CSS] Selectors #3905

Closed chrisdavidmills closed 3 years ago

chrisdavidmills commented 3 years ago

Acceptance criteria

    • [x] The listed features are documented sufficiently on MDN
    • [x] BCD is updated
    • [x] Interactive example and data repos are updated if appropriate
    • [ ] The content has been reviewed as needed

Features to document

  1. Support for compound selectors and complex selectors within :not() negation pseudo-class. Needs BCD update, and some examples adding to the :not() page

Related Gecko bugs

For folks helping with Firefox-related documentation features — make sure above AC have been done, but also:

rachelandrew commented 3 years ago

Added an example of complex syntax to the example section. I also updated the previous example with a clearer result and to remove a class named ".crazy" as it is exclusive language (regarding MH issues, and seemed unnecessary).

https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/:not

Added to release notes.

chrisdavidmills commented 3 years ago

Great work, thanks @rachelandrew . I've reviewed this, made a few small edits, and it looks fine.

I also see you did the BCD too: https://github.com/mdn/browser-compat-data/pull/7376

When that gets merged, I think we can close this.

mikoMK commented 3 years ago

I had a look at the examples and it seems that the existing example

body :not(p) {
  text-decoration: underline;
}

has no effect due to the newly used text-decoration: overline. I don't think that's intentional. How about using this:

body :not(p) {
  font-style: italic;
}
chrisdavidmills commented 3 years ago

I had a look at the examples and it seems that the existing example

body :not(p) {
  text-decoration: underline;
}

has no effect due to the newly used text-decoration: overline. I don't think that's intentional. How about using this:

body :not(p) {
  font-style: italic;
}

I had a look at this, and it seems to work for me (I tried in both Fx and Chrome) — the third and fourth elements in the example are underlined because they are not paragraphs?

mikoMK commented 3 years ago

It works in Fx 83 and Chrome, because they don't support complex selectors in ":not()" and therefore ignore the fifth rule. When testing in Fx Beta or Nightly (which support complex selectors in ":not()") the text-decoration: overline of the fifth rule takes precedence. Am I missing something? 2020-11-18 12_07_38-_not() - CSS_ Cascading Style Sheets _ MDN - Firefox Developer Edition

chrisdavidmills commented 3 years ago

@mikoMK my apologies — I didn't have my Firefox Nightly updated. Now I can see exactly what you mean ;-)

I've updated the wording and the styling so that it makes a bit more sense.

mikoMK commented 3 years ago

There's no need to apologize. I'm glad I could help to improve the example. Thanks to you and the other tech writers at MDN. You're doing an amazing job in providing the world with knowledge!

chrisdavidmills commented 3 years ago

Thanks to you and the other tech writers at MDN. You're doing an amazing job in providing the world with knowledge!

;-)

chrisdavidmills commented 3 years ago

All done, looks like we can close this one.