Skip to content

Commit 7ead1f6

Browse files
committed
fix(theme-default): fix content headers styles
1 parent 03bdbfd commit 7ead1f6

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

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

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,6 @@ $mobileSidebarWidth = $sidebarWidth * 0.82;
4545
}
4646

4747
.theme-container {
48-
{$contentClass}:not(.custom) > h1, h2, h3, h4, h5, h6 {
49-
margin-top: 0.5rem - $navbarHeight;
50-
padding-top: ($navbarHeight + 1rem);
51-
margin-bottom: 0;
52-
53-
&:first-child {
54-
margin-top: -1.5rem;
55-
margin-bottom: 1rem;
56-
57-
+ p, + pre, + .custom-block {
58-
margin-top: 2rem;
59-
}
60-
}
61-
}
62-
6348
&.sidebar-open {
6449
.sidebar-mask {
6550
display: block;
@@ -90,6 +75,23 @@ $mobileSidebarWidth = $sidebarWidth * 0.82;
9075
}
9176
}
9277

78+
h1, h2, h3, h4, h5, h6 {
79+
{$contentClass}:not(.custom) > & {
80+
margin-top: 0.5rem - $navbarHeight;
81+
padding-top: ($navbarHeight + 1rem);
82+
margin-bottom: 0;
83+
84+
&:first-child {
85+
margin-top: -1.5rem;
86+
margin-bottom: 1rem;
87+
88+
+ p, + pre, + .custom-block {
89+
margin-top: 2rem;
90+
}
91+
}
92+
}
93+
}
94+
9395
{$contentClass}:not(.custom) {
9496
@extend $wrapper;
9597

0 commit comments

Comments
 (0)