The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Dark/Light color switch Reply To: Dark/Light color switch


Actually i come up with the idea (saw somewhere) that makes it very simple=))
add class to body and switch them with button (toggle classes)
.light bg: #fff color: #333 & .dark bg:#333 color #fff

the only problem for me right now is that
i’m using also text-fill-color and stroke for certain elements
and i have no idea how to change them also with that same button

plus text-fill-color overwrites color so there is also conflicts((
And still i think the easiest way will be change colors with js
kinda find all #333 and change to #fff & find all #fff and change to #333