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
Copy file name to clipboardExpand all lines: docs/guide/styles.md
+60-3
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Override colors
4
4
5
-
You can easily override the [default palette colors](https://github.com/vue-a11y/vuepress-theme-default-vue-a11y/blob/master/styles/palette.styl) by creating the `.vuepress/styles/palette.style` file.
5
+
You can easily override the [default palette colors](https://github.com/vue-a11y/vuepress-theme-default-vue-a11y/blob/master/styles/palette.styl) by creating the `.vuepress/styles/palette.styl` file.
6
6
7
7
**e.g.**
8
8
@@ -20,6 +20,63 @@ The theme comes with light, dark and sepia color palettes.
20
20
**If you don't want to make any of these themes available, just don't include them in the `colorMode` property**
21
21
:::
22
22
23
-
## New theme color
23
+
## Add theme color
24
24
25
-
Pretty soon
25
+
To create a new theme is simple, first you need to add this new theme in the props of the colorMode property in themeConfig.
26
+
27
+
```javascript
28
+
// e.g. docs/.vuepress/config.js
29
+
module.exports= {
30
+
themeConfig: {
31
+
colorMode: {
32
+
props: {
33
+
modes: [ 'high-contrast' ]
34
+
}
35
+
}
36
+
}
37
+
```
38
+
39
+
You now need to create the style files where you will create new variables.
You can consult the existing css variables in the theme through [this link](https://github.com/vue-a11y/vuepress-theme-default-vue-a11y/blob/master/styles/index.styl)
78
+
:::
79
+
80
+
<p align="center">
81
+
<img src="/high-contrast-theme-example.png" alt="A preview of the theme in high contrast colors framed on an apple safari dark browser">
0 commit comments