3 ms·
We'll you could use the HTML element for the class. The other day I did an example for a client this way: <html class="default"> <head> <script> if( localStora
by phillipseamore 8y ago
We'll you could use the HTML element for the class. The other day I did an example for a client this way:
<html class="default">
<head>
<script>
if( localStorage.getItem('dark-mode') !== null ) { document.documentElement.classList.add('dark-mode'); }
</script>