You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,11 @@
2
2
3
3
## 2.0.0
4
4
5
+
[Migration for v1](https://tolking.github.io/vuepress-theme-default-prefers-color-scheme/migration.html)
6
+
5
7
- rename `defaultTheme` to `overrideTheme` and clarify it overrules and ignores [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
8
+
- add `prefersTheme` to specify the theme when the browser does not support prefers-color-scheme
9
+
- remove `css-prefers-color-scheme` from `package.json`
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Force users into a specific theme, ignoring [prefers-color-scheme](https://devel
30
30
Allowed values:
31
31
32
32
-`'light' | 'dark'`: Always use the given theme
33
-
-`{ light: [beginHours: number, endHours: number], dark: [beginHours: number, endHours: number] }`: Control the time of the day when each theme is used
33
+
-`{ light: [beginHours: number, endHours: number], dark: [beginHours: number, endHours: number] }`: Control the time of the day when each theme is used
34
34
35
35
For example:
36
36
@@ -45,6 +45,25 @@ module.exports = {
45
45
}
46
46
```
47
47
48
+
### prefersTheme (optional)
49
+
50
+
Use the given theme when the browser does not support prefers-color-scheme but supports CSS Variables
Copy file name to clipboardExpand all lines: docs/README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Force users into a specific theme, ignoring [prefers-color-scheme](https://devel
47
47
Allowed values:
48
48
49
49
-`'light' | 'dark'`: Always use the given theme
50
-
-`{ light: [beginHours: number, endHours: number], dark: [beginHours: number, endHours: number] }`: Control the time of the day when each theme is used
50
+
-`{ light: [beginHours: number, endHours: number], dark: [beginHours: number, endHours: number] }`: Control the time of the day when each theme is used
51
51
52
52
For example:
53
53
@@ -62,20 +62,24 @@ module.exports = {
62
62
}
63
63
```
64
64
65
-
::: danger
66
-
After `v1.1.0`, it is no longer necessary to add a postcss plugIn to set `overrideTheme`. It is recommended to remove the relevant content. In the near future, `css-prefers-color-scheme` will be remove from `package.json`
65
+
### prefersTheme (optional)
66
+
67
+
Use the given theme when the browser does not support prefers-color-scheme but supports CSS Variables
0 commit comments