question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

w3c is iffy on complex vs compound in nth-child and possibly other lists

See original GitHub issue

I’m not sure if this will affect us, but I figure I’ll create an issue to track this. It seems that there was some concern with whether :nth-child(an+b of) should support compound or complex selectors. The idea is that it may be easier to get compound out the door first for L4, and then complex would be deferred to L5. The discussion seems to question others as well such as :is(), :not(), etc.

If they defer to L5, I don’t think anything for us will change. If that is the case, we’ll just say we support L5. If they completely abandon complex in one or more, we may have to downgrade complex support to compound.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
facelessusercommented, Sep 30, 2019

No browser supports it, I think it’s not worth exploring. At least that’s what I decided.

Agreed.

./**/foo

Ugh, I think I generally do pretty good at allowing comments, but yeah, I don’t support that. I think I only allow them in cases where whitespace is acceptable, which is like 99% of the cases, but apparently not all of them 🙂 .

Yeah, if you have to parse all valid CSS, which it sounds like you do, you have to look for that kind of stuff and have a finer resolution of how you tokenize. In my case, I’m close enough to be usable for the cases of my users.

0reactions
facelessusercommented, Sep 30, 2019

This conversation reminded me that the documentation for this has already been updated mentioning our current direction. We mention the differences between level 3 and level 4 and mention that we follow the discussed level 5 direction. This issue can actually be closed as all of this is now addressed.

I think even if the CSSWG were to completely drop complex selectors, we might keep them around in Soup Sieve simply for their usefulness. While we strive to follow the spec, we are not completely bound to it as we allow for things like :contains() etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selectors Level 4 - W3C
A given element is said to match a complex selector when there exists a list of elements, each matching a corresponding compound selector...
Read more >
nth-child() - CSS: Cascading Style Sheets - MDN Web Docs
:nth-child( <nth> [ of <complex-selector-list> ]? ). Keyword values. odd. Represents elements whose numeric position in a series of siblings is ...
Read more >
How nth-child Works - CSS-Tricks
It boils down to what is in between those parentheses. nth-child accepts two keywords in that spot: even and odd. Those should be...
Read more >
Complex vs Compound Selectors | Miriam Eric Suzanne
And we can string all that together into selector lists, targeting multiple elements based on a variety of properties and relationships. It's a ......
Read more >
Untitled
Bahia ba vs villa nova mg, Fhea 2015, Cincinnati enquirer classifieds pets, Hanford newsweek! Keski-suomen osuuspankki tapahtumat, David barton gym chicago ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found