Re: [csswg-drafts] [selectors] :visible pseudo-class for targeting only visible elements (#5827)

How do you avoid cycles?

:visible { display: none }

And BTW, `:first-child:visible` would match the first child *if* it's visible, instead of the first visible child. That would be `:nth-child(1 of :visible)`.

> this is extremely useful for situations where a script or style tag might appear first in the DOM but is not visible to the user.

I think it would be easier to cover this usecase with a `:metadata` pseudo-class, matching [metadata content]( `base`, `link`, `meta`, `noscript`, `script`, `style`, `template`, `title`. But I'm not convinced this is worth it.

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Tuesday, 29 December 2020 16:54:25 UTC