Skip to main content

Max Glenister

It's 2022 and :only-child isn't aware of text nodes?

I'm trying to select an image that is the only direct descender of an element, with no text node siblings, e.g.:

<div><img /></div>

Not

<div>Hello<img />World</div>

div img:only-child will select this img in both cases, as will div img:first-child and div img:last-child

Am I missing something?

Max Glenister

Amazing! 😍🕹

Porting Zelda Classic to the Web

Max Glenister

I've been fiddling with my instance (https://social.omgmog.net), and for now I think I'm happy with it and how it integrates with the rest of my site.

Another couple of evening and it'll hopefully match my site design more!

indieweb

Max Glenister

👏

Max Glenister

The Demise of the Mildly Dynamic Website

Max Glenister

Sending this reply from a fresh instance of

Max Glenister

Alright, looks as if I've got this Known thing working!