Images with dark/light tag
- Dominant language
- Dart
- Stars
- 944
- Forks
- 184
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 12
Description
On GitHub, one can specify image sources based on [light/dark theme][github_docs].
Basically that means user can define pictures like this and then its aware of when it should be light version or black one.
```html

```
Try switching your theme and see this example:

### Issue
Because majority (I suppose) of pub.dev packages are imported from GitHub, it would be very cool if pub.dev could handle theme based sources like that.
On pub.dev, it also works, but because of the site that does not change the theme, it actually does not work.
light:

dark:

Now imagine that you have only white text logo for dark theme, ergo making the logo/whatever **not visible**.
### Proposal
Make a research of what solutions is possible and set light theme as forced default for pub.dev at this moment.
Sources:
- https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
- https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
- https://web.dev/color-scheme/
- https://www.ditdot.hr/en/dark-mode-website-tutorial
---
I updated the original issue so it contains valid up-to-date resources. ([referenced GitHub's docs][github_docs])
[github_docs]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to
---
Update 2: it seems that one cannot force CSS color scheme and it would have to be done in JS.
Contributor guide
Assessment
This issue has not been assessed yet.