Skip to content

Instantly share code, notes, and snippets.

Avatar
🤙

Reggie Paquette regpaq

🤙
View GitHub Profile
@regpaq
regpaq / lightswitch.js
Last active Jan 14, 2021 — forked from nickpunt/lightswitch.js
Lightswitch: A dark mode switcher with user override
View lightswitch.js
/*******************************************************************************
LIGHTSWITCH: A DARK MODE SWITCHER WITH USER OVERRIDE
Originally By Nick Punt 10/26/2018
How to use:
1. Create two data theme sets with CSS Variables 'light' and 'dark' such as:
html[data-theme="light"] {
--color-text: #000;