utterance / utterances

:crystal_ball: A lightweight comments widget built on GitHub issues

Home Page:https://utteranc.es

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to achieve adaptive dark mode

Matt-wzy opened this issue · comments

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

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.

It's ok.