Skip to content

Commit 77c1b4d

Browse files
zonemeenbrc-dd
andauthored
fix(style): incorrect header anchor icon position with multline headers (#2694)
Co-authored-by: Divyansh Singh <[email protected]>
1 parent 2ae90a2 commit 77c1b4d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/client/theme-default/components/VPBadge.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ h3 .VPBadge,
3030
h4 .VPBadge,
3131
h5 .VPBadge,
3232
h6 .VPBadge {
33-
vertical-align: top;
33+
vertical-align: text-top;
3434
}
3535
3636
h2 .VPBadge {

src/client/theme-default/styles/components/vp-doc.css

+7-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@
3636
}
3737

3838
.vp-doc .header-anchor {
39-
float: left;
39+
position: absolute;
40+
top: 0;
41+
left: 0;
4042
margin-left: -0.87em;
41-
padding-right: 0.23em;
4243
font-weight: 500;
4344
user-select: none;
4445
opacity: 0;
@@ -74,6 +75,10 @@
7475
}
7576
}
7677

78+
.vp-doc h2 .header-anchor {
79+
top: 24px;
80+
}
81+
7782
/**
7883
* Paragraph and inline elements
7984
* -------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)