Merge pull request #2 from lucas-labs/1-auto-switch-between-dark-and-light-theme

feat: ✨ auto switch dark-light themes
This commit is contained in:
Lucas Colombo authored and GitHub committed 2024-04-12 21:46:45 -03:00 Unverified
commit 146ee5e781
3 files changed
+8 -1

No files matched your search

+5 -1
View File
@@ -12,6 +12,10 @@
![light theme](figs/light.png)
## `auto`
Switches between `dark` and `light` automatically based on the user's system preference.
## Usage
1. Clone this repo
@@ -20,7 +24,7 @@
```ini
[ui]
THEMES=...,dark,light
THEMES=...,dark,light,auto
DEFAULT_THEME=dark # optional
```
+1
View File
@@ -0,0 +1 @@
@import "./theme-light.css"(prefers-color-scheme:light);@import "./theme-dark.css"(prefers-color-scheme:dark);
+2
View File
@@ -0,0 +1,2 @@
@import "./theme-light.css" (prefers-color-scheme: light);
@import "./theme-dark.css" (prefers-color-scheme: dark);