@umijs/plugin-docs 4.0.0-rc.20 → 4.0.0-rc.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,9 +35,17 @@ export default () => {
35
35
  if (toggle) {
36
36
  document.body.classList.remove('dark');
37
37
  localStorage.setItem('theme', 'light');
38
+ window.document.documentElement.style.setProperty(
39
+ '--color-scheme',
40
+ 'light',
41
+ );
38
42
  } else {
39
43
  document.body.classList.add('dark');
40
44
  localStorage.setItem('theme', 'dark');
45
+ window.document.documentElement.style.setProperty(
46
+ '--color-scheme',
47
+ 'dark',
48
+ );
41
49
  }
42
50
  }, [toggle]);
43
51
 
@@ -208,6 +208,8 @@ html {
208
208
 
209
209
  :root {
210
210
  --anchor-offset: 28px;
211
+
212
+ color-scheme: var(--color-scheme, light);
211
213
  }
212
214
 
213
215
  /** Anchor with offset for headings */
@@ -2035,6 +2035,7 @@ html {
2035
2035
 
2036
2036
  :root {
2037
2037
  --anchor-offset: 28px;
2038
+ color-scheme: var(--color-scheme, light);
2038
2039
  }
2039
2040
 
2040
2041
  /** Anchor with offset for headings */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugin-docs",
3
- "version": "4.0.0-rc.20",
3
+ "version": "4.0.0-rc.23",
4
4
  "description": "@umijs/plugin-docs",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugin-docs#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/issues",
@@ -39,7 +39,7 @@
39
39
  "rehype-slug": "5.0.1",
40
40
  "remark-gfm": "^3.0.1",
41
41
  "tailwindcss": "^3.0.24",
42
- "umi": "4.0.0-rc.20"
42
+ "umi": "4.0.0-rc.23"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"