1

I have a simple question. How to use reddit Embed as a light theme? I mean, by default reddit is using dark mode. Currently I'm using dark mode on my website and with reddit embed(dark mode also) i have a conflict, because font-color of embed is also dark and I cannot read anything. So I have to switch reddit embed to light theme. I did research but i didnt found anything. How to use light mode on reddit embed? The way I embed reddit script is like so:

<blockquote class="reddit-card"><a href=${url}></a></blockquote>

url is simply url from reddit post, along with this I'm use reddit script. I will be grateful for help!

Chazzy97
  • 75
  • 8

1 Answers1

1
<div>mytest</div>
<div class="reddit-embed" data-embed-media="www.redditmedia.com" data-embed-parent="false" data-embed-live="false" data-embed-uuid="b16d61dd-20f4-432d-996b-03f1140c744b" data-embed-created="2021-03-31T10:23:23.712Z"><a href="https://www.reddit.com/r/OldSchoolCool/comments/mgyn3y/when_homer_simpson_started_a_band_1993_1969/gsvyyw7/">Comment</a> from discussion <a href="https://www.reddit.com/r/OldSchoolCool/comments/mgyn3y/when_homer_simpson_started_a_band_1993_1969/">When Homer Simpson started a band. 1993/ 1969</a>.</div><script async src="https://www.redditstatic.com/comment-embed.js"></script>

pic

The Reddit embed is an iframe. You don't have direct access on it. However you can specify a custom script.

You will have to modify this one https://www.redditstatic.com/comment-embed.js and host your js script somewhere.

In that js script you need to specify a custom CSS you want to load and then you can modify the colors accordingly:

enter image description here

Not a finished solutions but a general guidance on how you can style your embed. You haven't provided any code so it is hard to give you a specific answer to your question.

In my second picture you can see your mentioned blockquote with a style attribute. That does the coloring.

Tin Nguyen
  • 5,250
  • 1
  • 12
  • 32