Skip to content
This repository was archived by the owner on Oct 1, 2023. It is now read-only.

Commit eda3253

Browse files
committed
docs: change docs
1 parent a81b291 commit eda3253

File tree

4 files changed

+11
-37
lines changed

4 files changed

+11
-37
lines changed

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,11 @@ module.exports = {
5555
defaultTheme: { dark: [18, 6] },
5656
// or
5757
defaultTheme: { light: [6, 18], dark: [18, 6] },
58-
},
59-
// When using `light theme` or `dark theme`, you need to add a postcss plugins to your config.js
60-
postcss: {
61-
plugins: [
62-
require('css-prefers-color-scheme/postcss'),
63-
require('autoprefixer')
64-
]
6558
}
6659
}
6760
```
6861

69-
[Theme Config](https://v1.vuepress.vuejs.org/theme/default-theme-config.html)
62+
[Theme Config](https://vuepress.vuejs.org/theme/default-theme-config.html)
7063

7164
## Styling
7265

@@ -77,7 +70,3 @@ To apply simple color overrides to the styling of the [default preset](https://g
7770
## License
7871

7972
[MIT](http://opensource.org/licenses/MIT)
80-
81-
## Keywords
82-
83-
vue vuepress documentation prefers-color-scheme default-theme light-theme dark-theme

docs/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Introduction
22

3-
vuepress-theme-default-prefers-color-scheme is a theme that adds `light` and `dark` themes to the [default theme](https://v1.vuepress.vuejs.org/zh/theme/default-theme-config.html) of vuepress
3+
vuepress-theme-default-prefers-color-scheme is a theme that adds `light` and `dark` themes to the [default theme](https://vuepress.vuejs.org/zh/theme/default-theme-config.html) of vuepress
44

55
## How It Works
66

7-
base on [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) and [CSS Variables](https://developer.mozilla.org/en-US/docs/Web/CSS/--*)
7+
base on prefers-color-scheme and CSS Variables
88

99
#### View Support Browsers
1010

@@ -45,7 +45,7 @@ module.exports = {
4545
- Required: `false`
4646

4747
::: tip
48-
By default, light or dark themes are displayed by [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme), You can change it by `defaultTheme`. base on [css-prefers-color-scheme](https://github.com/csstools/css-prefers-color-scheme)
48+
By default, light or dark themes are displayed by [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme), You can change it by `defaultTheme`.
4949
:::
5050

5151
support `light`, `dark` or `{ theme: [begin hours, end hours] }`
@@ -59,18 +59,11 @@ module.exports = {
5959
defaultTheme: { dark: [18, 6] },
6060
// or
6161
defaultTheme: { light: [6, 18], dark: [18, 6] },
62-
},
63-
// When using `light theme` or `dark theme`, you need to add a postcss plugins to your config.js
64-
postcss: {
65-
plugins: [
66-
require('css-prefers-color-scheme/postcss'),
67-
require('autoprefixer')
68-
]
6962
}
7063
}
7164
```
7265

73-
[Theme Config](https://v1.vuepress.vuejs.org/theme/default-theme-config.html)
66+
[Theme Config](https://vuepress.vuejs.org/theme/default-theme-config.html)
7467

7568
## Styling
7669

docs/zh/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## 介绍
22

3-
vuepress-theme-default-prefers-color-scheme 是一款为 [vuepress 默认主题](https://v1.vuepress.vuejs.org/zh/theme/default-theme-config.html) 增加 `浅色``深色` 主题的一款主题
3+
vuepress-theme-default-prefers-color-scheme 是一款为 [vuepress 默认主题](https://vuepress.vuejs.org/zh/theme/default-theme-config.html) 增加 `浅色``深色` 主题的一款主题
44

55
## 原理
66

7-
主要是基于下一代 css 技术中的 [prefers-color-scheme](https://developer.mozilla.org/zh-CN/docs/Web/CSS/@media/prefers-color-scheme)[CSS Variables](https://developer.mozilla.org/zh-CN/docs/Web/CSS/--*) 实现。
7+
主要是基于下一代 css 技术中的 prefers-color-scheme 与 CSS Variables 实现。
88

99
#### 查看支持浏览器
1010

@@ -45,7 +45,7 @@ module.exports = {
4545
- 可省略
4646

4747
::: tip
48-
默认情况下,要显示浅色或深色主题由 [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) 决定, 你可以通过设置 `defaultTheme` 来指定显示的主题颜色。基于 [css-prefers-color-scheme](https://github.com/csstools/css-prefers-color-scheme)
48+
默认情况下,要显示浅色或深色主题由 [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) 决定, 你可以通过设置 `defaultTheme` 来指定显示的主题颜色
4949
:::
5050

5151
支持 `light`, `dark` 或者 `{ theme: [begin hours, end hours] }`
@@ -59,18 +59,11 @@ module.exports = {
5959
defaultTheme: { dark: [18, 6] },
6060
// or
6161
defaultTheme: { light: [6, 18], dark: [18, 6] },
62-
},
63-
// 当你指定了显示主题的颜色时,你需要增加如下的 postcss 插件
64-
postcss: {
65-
plugins: [
66-
require('css-prefers-color-scheme/postcss'),
67-
require('autoprefixer')
68-
]
6962
}
7063
}
7164
```
7265

73-
其它配置与 [官方主题配置](https://v1.vuepress.vuejs.org/theme/default-theme-config.html) 相同
66+
其它配置与 [官方主题配置](https://vuepress.vuejs.org/theme/default-theme-config.html) 相同
7467

7568
## 样式
7669

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-theme-default-prefers-color-scheme",
3-
"version": "1.0.9",
3+
"version": "1.1.0",
44
"main": "index.js",
55
"description": "add prefers-color-scheme for vuepress default theme",
66
"author": "tolking <qw13131wang@gmail.com>",
@@ -17,11 +17,10 @@
1717
"build": "vuepress build docs"
1818
},
1919
"keywords": [
20-
"vue",
2120
"vuepress",
21+
"vuepress-theme",
2222
"documentation",
2323
"prefers-color-scheme",
24-
"default-theme",
2524
"light-theme",
2625
"dark-theme"
2726
],

0 commit comments

Comments
 (0)