Skip to content

Commit 7458fb3

Browse files
committed
docs: use import code syntax for default theme style variables
1 parent 0ec3811 commit 7458fb3

File tree

2 files changed

+2
-74
lines changed

2 files changed

+2
-74
lines changed

docs/reference/default-theme/styles.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,7 @@ Users can custom style variables via [palette file](#palette-file), and add extr
1010

1111
You can create a `.vuepress/styles/palette.scss` file to override predefined variables of default theme:
1212

13-
```scss
14-
// colors
15-
$accentColor: #3eaf7c !default;
16-
$textColor: #2c3e50 !default;
17-
$borderColor: #eaecef !default;
18-
$arrowBgColor: #ccc !default;
19-
$tipColor: #42b983 !default;
20-
$warningColor: #e7c000 !default;
21-
$dangerColor: #cc0000 !default;
22-
23-
// code colors
24-
$codeBgColor: #282c34 !default;
25-
$highlightLineBgColor: rgba(0, 0, 0, 66%) !default;
26-
$lineNumbersColor: rgba(255, 255, 255, 0.3) !default;
27-
28-
// badge component colors
29-
$badgeTipColor: $tipColor !default;
30-
$badgeWarningColor: $warningColor !default;
31-
$badgeDangerColor: $dangerColor !default;
32-
33-
// layout
34-
$navbarHeight: 3.6rem !default;
35-
$sidebarWidth: 20rem !default;
36-
$contentWidth: 740px !default;
37-
$homePageWidth: 960px !default;
38-
39-
// responsive breakpoints
40-
$MQNarrow: 959px !default;
41-
$MQMobile: 719px !default;
42-
$MQMobileNarrow: 419px !default;
43-
44-
// code
45-
$lineNumbersWrapperWidth: 3.5rem !default;
46-
$codeLang: 'c' 'cpp' 'cs' 'css' 'dart' 'docker' 'fs' 'go' 'html' 'java' 'js'
47-
'json' 'kt' 'less' 'makefile' 'md' 'php' 'py' 'rb' 'rs' 'sass' 'scss' 'sh'
48-
'styl' 'ts' 'toml' 'vue' 'yml' !default;
49-
```
13+
@[code{3-} scss](@vuepress/theme-default/src/client/styles/_variables.scss)
5014

5115
## Style File
5216

docs/zh/reference/default-theme/styles.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,7 @@
1010

1111
你可以创建一个 `.vuepress/styles/palette.scss` 文件来覆盖默认主题的预定义变量:
1212

13-
```scss
14-
// colors
15-
$accentColor: #3eaf7c !default;
16-
$textColor: #2c3e50 !default;
17-
$borderColor: #eaecef !default;
18-
$arrowBgColor: #ccc !default;
19-
$tipColor: #42b983 !default;
20-
$warningColor: #e7c000 !default;
21-
$dangerColor: #cc0000 !default;
22-
23-
// code colors
24-
$codeBgColor: #282c34 !default;
25-
$highlightLineBgColor: rgba(0, 0, 0, 66%) !default;
26-
$lineNumbersColor: rgba(255, 255, 255, 0.3) !default;
27-
28-
// badge component colors
29-
$badgeTipColor: $tipColor !default;
30-
$badgeWarningColor: $warningColor !default;
31-
$badgeDangerColor: $dangerColor !default;
32-
33-
// layout
34-
$navbarHeight: 3.6rem !default;
35-
$sidebarWidth: 20rem !default;
36-
$contentWidth: 740px !default;
37-
$homePageWidth: 960px !default;
38-
39-
// responsive breakpoints
40-
$MQNarrow: 959px !default;
41-
$MQMobile: 719px !default;
42-
$MQMobileNarrow: 419px !default;
43-
44-
// code
45-
$lineNumbersWrapperWidth: 3.5rem !default;
46-
$codeLang: 'c' 'cpp' 'cs' 'css' 'dart' 'docker' 'fs' 'go' 'html' 'java' 'js'
47-
'json' 'kt' 'less' 'makefile' 'md' 'php' 'py' 'rb' 'rs' 'sass' 'scss' 'sh'
48-
'styl' 'ts' 'toml' 'vue' 'yml' !default;
49-
```
13+
@[code{3-} scss](@vuepress/theme-default/src/client/styles/_variables.scss)
5014

5115
## Style 文件
5216

0 commit comments

Comments
 (0)