+ 2

Is there any shortcut in javascript for changing theme in this calculator?

https://code.sololearn.com/WZ6oy0UnGZA1/?ref=app I've used every button tag's I'd to make changes in it.

24th Feb 2020, 2:49 AM
Avinash
Avinash - avatar
1 Odpowiedź
+ 2
Use css variables to group default theme :root and [data-theme="dark"]. Set light or dark mode by just change the attribute of documentElement which is :root element. Here an example: https://code.sololearn.com/W66D9Fd5ms0N/?ref=app Try to change the default theme from light to dark mode by setting <html theme="dark">...
24th Feb 2020, 7:23 AM
Calviղ
Calviղ - avatar