JoshuaKGoldberg / dot-com

Personal site for Josh Goldberg. That's me!
https://joshuakgoldberg.com
MIT License
28 stars 6 forks source link

🚀 Feature: Add back in support for light/dark mode images #260

Open JoshuaKGoldberg opened 8 months ago

JoshuaKGoldberg commented 8 months ago

Bug Report Checklist

Overview

The only feature in the site I wasn't able to get back in from #258 was having different hero images in light or dark mode. For example, on the index, it should be:

...but there aren't docs in https://docs.astro.build/en/guides/images/ that specifically speak to light/dark mode (media query) support in <Picture>. TBD.

Additional Info

No response

Princesseuh commented 7 months ago

Just letting you know that yeah, the built-in Picture component does not support per-source media queries at this time.

I made this decision for multiple reasons:

I do believe the underlying API (the image service API) to be flexible enough to do it, though, but it would require some manual work at this time.

Hoping to improve this one day, alas, not enough hours in a day.

JoshuaKGoldberg commented 7 months ago

Thanks @Princesseuh, that's really good to know. I appreciate you mentioning!

Is there a place you'd recommend I file an issue / upvote an existing one? I couldn't find any in a basic search, but am not confident in my Astro GitHub searching.