utterance / utterances

:crystal_ball: A lightweight comments widget built on GitHub issues
https://utteranc.es
MIT License
8.66k stars 567 forks source link

how to achieve adaptive dark mode #638

Closed Matt-wzy closed 1 year ago

Matt-wzy commented 1 year ago

In my blog, using utterances is by adding code block like

<script src="https://utteranc.es/client.js"
        repo="[ENTER REPO HERE]"
        issue-term="pathname"
        theme="github-light"
        crossorigin="anonymous"
        async>
</script>

into my websites. I want my website to get the ability on adaptive dark mode, which I need a dark theme of utterances on the dark mode and a light theme on light mode, how should I do? Looking forward to your reply

Matt-wzy commented 1 year ago

How stupid I am, I forget to search closed issues first. In this issue #299, it has already been solved. But I still don't know how to use it directly, rather than use script to control it. theme="preferred-color-scheme" like this? I'll try this later.

Matt-wzy commented 1 year ago

It's ok.