display: contents
with nth-child
and other pseudo-classes
#11647
Labels
Closed as Question Answered
Used when the issue is more of a question than a problem, and it's been answered.
selectors-4
Current Work
I was playing around
display: contents
and it seemed to be working fine until I appliednth-child
selector. Shortly, it takes into account elements withdisplay: contents
as normal elements, which breaksnth-child
matching.Example
Where there are multiple .card elements, each one being wrapped into div with
display: contents
.Maybe I misunderstood something, though I think it should work as well since
display: contents
should display an element as if it's not there, right?The text was updated successfully, but these errors were encountered: