Open {re}Source @openresource.dev · Oct 9

But if you need this inside HTML elements, you'll have to create a link that includes the "#gh-light-mode-only" or "#gh-dark-mode-only" anchor tags.

1 likes 1 replies

?

Replies

Open {re}Source · Oct 9

Why? Because GitHub’s CSS rules check the href for these anchor tags behind the scenes to decide which image or link to display.