-
DescriptionI have an image that has a light-mode and dark-mode version that I want to use on my Quarto page. On most website I can do: <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://symbolica.io/resources/completion.png">
<source media="(prefers-color-scheme: light)" srcset="https://symbolica.io/resources/completion_light.png">
<img width="600" alt="A demo of Symbolica" src="https://symbolica.io/resources/completion.png">
</picture> but Quarto has its own light mode/dark mode toggle that ignores the preferred colour scheme. How can I modify this code so that it sees that the |
Beta Was this translation helpful? Give feedback.
Answered by
mcanouil
Aug 30, 2023
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
benruijl
-
Thanks, you javascript snippet works beautifully! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are several discussions on this here and a blog post to show the principle: https://mickael.canouil.fr/posts/2023-05-30-quarto-light-dark/
Edit: