Skip to content

Commit 4ffbf54

Browse files
committed
style: Fixing spacing between elements at markdown
1 parent 3ce0088 commit 4ffbf54

File tree

3 files changed

+45
-6
lines changed

3 files changed

+45
-6
lines changed

src/.vuepress/theme/components/headerCodeSnippet.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ref="headerCodeSnippet"
44
class="flex items-center justify-between w-full header-code"
55
>
6-
<div class="pl-6 text-base">
6+
<div class="pl-6 text-sm">
77
<slot />
88
</div>
99
<div class="flex">
@@ -99,5 +99,9 @@ export default {
9999
p {
100100
margin: 0;
101101
}
102+
103+
+ div[class*=language-] {
104+
@apply mt-0;
105+
}
102106
}
103107
</style>

src/.vuepress/theme/styles/_custom-blocks.scss

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
.custom-block.figure {
2-
@apply relative w-full;
2+
@apply relative w-full my-10;
3+
4+
+ p {
5+
@apply mt-0;
6+
}
7+
8+
> div[class*=language-] {
9+
@apply mb-0;
10+
}
311

412
&[data-type="bq"] {
5-
@apply p-10 border-b border-solid rounded-md c-border-color bg-primary;
13+
@apply p-10 border-b border-solid rounded-md c-border-color bg-primary my-10;
614
border-bottom-width: 6px;
715

16+
+ p {
17+
@apply mt-0;
18+
}
19+
820
&:before {
921
@apply absolute text-accent-primary border-none;
1022
content: '';
@@ -42,7 +54,12 @@
4254
}
4355

4456
.custom-block.alert {
45-
@apply px-6 pt-5 pb-4;
57+
@apply px-6 pt-5 pb-4 my-6;
58+
59+
+ p {
60+
@apply mt-0;
61+
}
62+
4663
&[data-alert] {
4764
@apply border border-solid rounded-md c-border-color bg-primary;
4865
border-bottom-width: 6px;
@@ -53,16 +70,27 @@
5370
@apply m-0;
5471
}
5572
}
73+
5674
&[data-alert="tip"] {
5775
background-color: var(--bg-custom-block-tip);
5876
border-color: var(--border-color-custom-block-tip);
5977
}
78+
6079
&[data-alert="warning"] {
6180
background-color: var(--bg-custom-block-warning);
6281
border-color: var(--border-color-custom-block-warning);
82+
83+
code {
84+
background-color: var(--border-color-custom-block-warning);
85+
}
6386
}
87+
6488
&[data-alert="danger"] {
6589
background-color: var(--bg-custom-block-danger);
6690
border-color: var(--border-color-custom-block-danger);
91+
92+
code {
93+
background-color: var(--border-color-custom-block-danger);
94+
}
6795
}
6896
}

src/.vuepress/theme/styles/_markdown.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@
3535
z-index: 2;
3636
line-height: 1.04em;
3737

38+
+ h3 {
39+
@apply mt-8;
40+
}
3841

3942
+ p {
4043
margin-top: 30px;
4144
}
4245
}
4346

4447
h3 {
45-
@apply text-xl font-bold;
48+
@apply text-xl font-bold mt-12 mb-8;
4649
line-height: 1.10em;
4750
}
4851

@@ -193,8 +196,12 @@
193196
}
194197

195198
div[class*=language-] {
196-
@apply relative w-full whitespace-normal;
199+
@apply relative w-full whitespace-normal my-8;
197200
background-color: var(--bg-code-block);
201+
202+
+ p {
203+
@apply mt-0;
204+
}
198205
}
199206

200207
.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog { color:#999 }

0 commit comments

Comments
 (0)