Skip to content

Instantly share code, notes, and snippets.

View regpaq's full-sized avatar
🤙

Reggie Paquette regpaq

🤙
View GitHub Profile
@regpaq
regpaq / lightswitch.js
Last active January 14, 2021 14:20 — forked from nickpunt/lightswitch.js
Lightswitch: A dark mode switcher with user override
/*******************************************************************************
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;