utterance / utterances

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

dark theme? #49

Closed hamptonmoore closed 5 years ago

hamptonmoore commented 5 years ago

My site uses a dark theme, how can I style utterances to be dark?

hamptonmoore commented 5 years ago

Possibly based on https://github.com/StylishThemes/Github-Dark

hamptonmoore commented 5 years ago

I'm thinking of piping the service through nginx, and add an css stylesheet, but the kinda defeats the no server aspect of it

JokerQyou commented 5 years ago

I think currently there is no way to style utterances elements because it uses iframe? Would it be suitable to allow loading custom CSS file in the iframe so we could apply custom styles?

Say we add an attribute custom-css to the script:

<script src="https://utteranc.es/client.js"
        repo="[ENTER REPO HERE]"
        issue-term="url"
        crossorigin="anonymous"
        custom-css="https://example.com/my/custom/styles.css"
        async>
</script>

And utterances load this CSS file inside the iframe.

hamptonmoore commented 5 years ago

That would be amazing

benharri commented 5 years ago

Dark mode is greatly needed. I've tried including some of the generated styles from darkreader and they don't apply properly inside the iframe.

tarampampam commented 5 years ago

@jdanyow This is most important feature for me, dude