[csswg-drafts] `display: contents` with `nth-child` (#11647)

FrameMuse has just created a new issue for https://github.com/w3c/csswg-drafts:

== `display: contents` with `nth-child` ==
I was playing around `display: contents` and it seemed to be working fine until I applied `nth-child` selector. Shortly, it takes into account elements with `display: contents` as normal elements.

**Example**

Where there are multiple .card elements, each one being wrapped into div with `display: contents`.

```css
.card:nth-child(2n):not(:last-child)::before {
  content: "";
  // ...
}
```

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?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11647 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 4 February 2025 10:56:37 UTC