Change CSS variable names + create a themer #109
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "adi-create-themer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Try it out at https://csclub.uwaterloo.ca/~a3thakra/website-demo/themer/
06d6f61ae4
to8a021f32b2
Looks good to me!
@ -0,0 +166,4 @@
function getSavedPalette() {
const raw = localStorage.getItem(STORAGE_KEY);
return raw == null ? undefined : (JSON.parse(raw) as Palette);
Nit: might be better to have this function return the default palette when the it's not found in local storage, so callers don't have to worry about checking for undefined.
It's only used in 1 place rn (line 102) and I need to check if a saved version exists, so I can assign the theme name correctly. This might change later on when we actually have a dark theme.