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:
commit
146ee5e781
@ -12,6 +12,10 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## `auto`
|
||||||
|
|
||||||
|
Switches between `dark` and `light` automatically based on the user's system preference.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. Clone this repo
|
1. Clone this repo
|
||||||
@ -20,7 +24,7 @@
|
|||||||
|
|
||||||
```ini
|
```ini
|
||||||
[ui]
|
[ui]
|
||||||
THEMES=...,dark,light
|
THEMES=...,dark,light,auto
|
||||||
DEFAULT_THEME=dark # optional
|
DEFAULT_THEME=dark # optional
|
||||||
```
|
```
|
||||||
|
|
||||||
|
1
dist/public/assets/css/theme-auto.css
vendored
Normal file
1
dist/public/assets/css/theme-auto.css
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
@import "./theme-light.css"(prefers-color-scheme:light);@import "./theme-dark.css"(prefers-color-scheme:dark);
|
2
src/themes/scss/auto.scss
Normal file
2
src/themes/scss/auto.scss
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@import "./theme-light.css" (prefers-color-scheme: light);
|
||||||
|
@import "./theme-dark.css" (prefers-color-scheme: dark);
|
Loading…
x
Reference in New Issue
Block a user