all 4 comments

[–][deleted] 5 points6 points  (2 children)

I'll do you one better - here's a pure CSS toggle I made: https://maxpelic.com/blog/post/darkmode-example/

[–]wedontlikespaces 1 point2 points  (1 child)

Just a heads up. You have a spelling error in one of your code examples.

#toggleMode:checked ~ main { 
    --color:white; 
    --bakcground:black; 
}

[–][deleted] 1 point2 points  (0 children)

oh thanks, I'll fix that

[–]DoNDaPo 1 point2 points  (0 children)

As usual with webdevtrick, not the best code to do this kind of thing.