Skip to content

Commit f35af5f

Browse files
committed
refactor(theme-default): change custom-block to custom-container
1 parent 10549a1 commit f35af5f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

packages/@vuepress/theme-default/src/node/resolveContainerPluginOptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const resolveContainerPluginOptions = (
3636
/**
3737
* Resolve options for @vuepress/plugin-container
3838
*
39-
* For details block
39+
* For details container
4040
*/
4141
export const resolveContainerPluginOptionsForDetails = (
4242
options: DefaultThemeOptions
@@ -48,7 +48,7 @@ export const resolveContainerPluginOptionsForDetails = (
4848
return {
4949
type: 'details',
5050
before: (info) =>
51-
`<details class="custom-block details">${
51+
`<details class="custom-container details">${
5252
info ? `<summary>${info}</summary>` : ''
5353
}\n`,
5454
after: () => '</details>\n',
@@ -58,7 +58,7 @@ export const resolveContainerPluginOptionsForDetails = (
5858
/**
5959
* Resolve options for @vuepress/plugin-container
6060
*
61-
* For code-group block
61+
* For code-group container
6262
*/
6363
export const resolveContainerPluginOptionsForCodeGroup = (
6464
options: DefaultThemeOptions

packages/@vuepress/theme-default/src/styles/custom-blocks.styl renamed to packages/@vuepress/theme-default/src/styles/custom-container.styl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@require './_variables';
22

3-
.custom-block {
4-
.custom-block-title {
3+
.custom-container {
4+
.custom-container-title {
55
font-weight: 600;
66
margin-bottom: -0.4rem;
77
}
@@ -23,7 +23,7 @@
2323
border-color: $warningColor;
2424
color: darken($warningColor, 50%);
2525

26-
.custom-block-title {
26+
.custom-container-title {
2727
color: darken($warningColor, 25%);
2828
}
2929

@@ -37,7 +37,7 @@
3737
border-color: $dangerColor;
3838
color: darken($dangerColor, 50%);
3939

40-
.custom-block-title {
40+
.custom-container-title {
4141
color: darken($dangerColor, 25%);
4242
}
4343

packages/@vuepress/theme-default/src/styles/index.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@require './badge';
66
@require './code';
77
@require './code-group';
8-
@require './custom-blocks';
8+
@require './custom-container';
99
@require './dropdown';
1010
@require './home';
1111
@require './layout';

packages/@vuepress/theme-default/src/styles/layout.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ h1, h2, h3, h4, h5, h6 {
9696
margin-top: -1.5rem;
9797
margin-bottom: 1rem;
9898

99-
+ p, + pre, + .custom-block {
99+
+ p, + pre, + .custom-container {
100100
margin-top: 2rem;
101101
}
102102
}

0 commit comments

Comments
 (0)