I am working on a site, and I've made 2 different files with separate css for dark mode and light mode respectively. Each of these files have multiple subclasses with separate css within. For example there are 2 files, dark.css (dark mode) and main.css (light mode) and each of these has various stuff within like h1, h5, h6, .navbar and a lot more. How do I change the toggle so that on the pressing of the button, the page imports dark.css instead of main.css and vice versa.
I tried various methods using sites but they all refer to making separate classes which is a lengthy procedure which I do not like too much. So is there an easier like the one I mentioned above that uses js? I do not want to change any class names and I want to use the files as they are and just want to change the html for the toggle button and possibly the js for it.
Thanks in advance!