DEV Community

Discussion on: Learning to toggle Dark Mode through React Hooks

Collapse
 
lelepg profile image
Letícia 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...

Collapse
 
tolentinoel profile image
Ellaine Tolentino

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!