Skip to content

Leandro-Suero/Ultimate-darkmode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The ULTIMATE Dark Mode

This is an experiment for different ways to activate dark mode.
In order of relevance/final impact those are:

1- Local Storage

When the user does an active selection of a theme with the buttons, it is persisted and used as the default setting for next website visit.

2- OS theme

If there isn't a previous setting stored then it checks for the OS dark theme option to see if it is enabled.

3- Time of the day

If there are no settings to default to, then it sets the dark mode when it is night time (21hs-7hs).