Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

🌐 Website Issue | Use <picture> instead of changing src of <img> #1468

Open
dawidpotocki opened this issue Nov 6, 2019 · 1 comment
Open
Labels
todo 🌐 website issue *Technical* issues with the website.

Comments

@dawidpotocki
Copy link
Contributor

I made that when we set theme, we change src of recommendation <img>, which
might seem okay, but Firefox after doing nothing for few minutes, when later
changing theme, it would change image after some time. Chromium from what I
understand, if we also leave it for some time, when changing theme it would
actually take some time to apply theme, which I feel is because of these
<img>s, I could be wrong here though. Another thing is that it only works
with JavaScript enabled, which I would like to avoid.

So there is <picture> tag which we could use to specify few sources so we
could easily change image depending on @media, which would allow us to make
it work without JavaScript and probably fix these bugs.

<picture> on MDN:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture

@dawidpotocki dawidpotocki added todo 🌐 website issue *Technical* issues with the website. labels Nov 6, 2019
@nitrohorse
Copy link
Contributor

Good idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
todo 🌐 website issue *Technical* issues with the website.
Projects
None yet
Development

No branches or pull requests

2 participants