Suggested Dark Mode <Code>
-
tennysongardi last edited by leocg
So I think Opera GX needs better dark mode. Here's the code in HTML, CSS, JS!
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { padding: 25px; background-color: #f2f2f2; color: #616161; font-size: 25px; } .dark-mode { background-color: #616161; color: #f2f2f2; } </style> </head> <body> <p>Dark Mode</p> <button onclick="myFunction()">Toggle dark mode</button> <script> function myFunction() { var element = document.body; element.classList.toggle("dark-mode"); } </script> </body> </html>
Hope u like it! Test the code at something like repl.it or w3schools.com
-
areba21 last edited by
@tennysongardi said in Suggested Dark Mode <Code>:
So I think Opera GX needs better dark mode. Here's the code in HTML, CSS, JS!
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { padding: 25px; background-color: #f2f2f2; color: #616161; font-size: 25px; } .dark-mode { background-color: #616161; color: #f2f2f2; } </style> </head> <body> <p>Dark Mode</p> <button onclick="myFunction()">Toggle dark mode</button> <script> function myFunction() { var element = document.body; element.classList.toggle("dark-mode"); } </script> </body> </html>
Hope u like it! Test the code at something like repl.it or w3schools.com
After uploading an image, my browser closed and updated itself(wtf?)
I figured the update was rolled back (because I can't use the clipboard to upload a picture anymore), so please restore it.
But the dark mode is still there; I'm not sure if that bug has been patched, but it seems to be working fine so far.
-