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

My little case that (maybe?) triggered this.

Authored HTML:

```html
<div class="book">
   <img src="" alt="">
   ...
</div>
```

CSS:

```css
.book :first-child {
  /* size the image */
}
```

Production HTML:

```html
<div class="book">
   <script src="third-party-performance-thing.js"></script>
   <img src="" alt="">
   ...
</div>
```

So that CSS now fails because it's targeting the wrong thing. Obviously can be worked around, but this CSS might be more resilient?

```css
.book :first-child:visible {
  /* size the image */
}
```


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


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

Received on Tuesday, 29 December 2020 15:07:08 UTC