|
|
|
|
|
by CGamesPlay
963 days ago
|
|
Two improvements that could be made: 1. My dark mode preferences change throughout the day. Caching the value in localStorage means that it will require manual updates twice a day. Add a behavior that automatically unsets the localStorage key whenever it would set it to the currently system-preferred value. 2. Apply the override using a CSS class on the body element calculated from a synchronous JavaScript block to avoid the flash. |
|
#2 is a great idea. I made a todo for myself to do that at some point.