You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pseudo class has "nth-*" selectors , but pseudo element don't. How about adding "nth-*" selectors?
Here's what @chriscoyier says: https://css-tricks.com/a-call-for-nth-everything/
At least, I want the pseudo element spec to implement the selectors:
As for ::nth-letter, I am not aware of any substitute, but neither am I aware of strong use cases. If you want this explicitly (instead of just for completeness sake), could you give some examples of where you'd use it and why existing CSS isn't good enough? There's one in the blog you linked to, but do you have more?
Closing out per #745 (comment)
It's possible we might revisit this idea in the far far future, but for now, based on past WG and implementer discussions, I think it's unlikely to happen.
Activity
frivoal commentedon Nov 22, 2016
This sits at the uncomfortable intersection of useful and freaking hard to implement.
The existing ::first-line and ::first-letter already cause lots of headaches, and implementers are not looking forward to more of that complexity.
That said, the kind of things you want to do with ::nth-line might end up being addressable with:
This is and early / unstable draft, but have a look here for more details:
https://drafts.csswg.org/css-overflow-4/#fragmentation
https://drafts.csswg.org/css-overflow-4/#fragment-pseudo-element
As for ::nth-letter, I am not aware of any substitute, but neither am I aware of strong use cases. If you want this explicitly (instead of just for completeness sake), could you give some examples of where you'd use it and why existing CSS isn't good enough? There's one in the blog you linked to, but do you have more?
fantasai commentedon Dec 28, 2018
Closing out per #745 (comment)
It's possible we might revisit this idea in the far far future, but for now, based on past WG and implementer discussions, I think it's unlikely to happen.