andrewcode-create / Website-Collection

A simple collection of websites to be displayed with a tab at the top.
GNU General Public License v3.0
0 stars 0 forks source link

Add light mode / dark mode support in CSS #4

Closed andrewcode-create closed 2 weeks ago

mq003at commented 2 weeks ago

The easiest way to do this is to make a class named .dark{} on your elements (like buttons, header, etc.). Then, you can add an onClick event to toggle 'dark' into classList (for example, buttonOne.classList.toggle('dark')).

If you want to have other options, you can reply here.