DEV Community

Discussion on: Learning to toggle Dark Mode through React Hooks

lelepg profile image
Leticia Pegoraro Garcez

That's a very elegant solution, but I wonder if using CSS variables to store colors and just change these variables according to the light or dark pallet would be a viable solution as well...

tolentinoel profile image
Ellaine Tolentino Author

That might actually work too! I haven’t tried it myself but I think I’ve seen a youtube video inline with using CSS variables!