Re: [csswg-drafts] [selectors] Add pseudo-classes for only counting rendered children (#7012)

That said, for cases like what you're describing, as long as you can describe "tr that is rendered" in terms of a selector, you can write your striping selector as:

```
table tr:nth-child(odd of [selector goes here]) td {...}
```

The `of <selector>` bit means it'll only count things matching that selector.

In this case, it looks like it could be:

```
table tr:nth-child(odd of :not(.direction[data-use-for-ui="0"][data-prediction-count="0"] )) td {...}
```

(Unfortunately, support for `:nth-child(... of ...)` isn't yet universal.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7012#issuecomment-1029351684 using your GitHub account


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

Received on Thursday, 3 February 2022 20:01:43 UTC