[site] fix: anchor offset
when navigating through an anchor
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ function getMarkdownLib() {
|
||||
.use(markdownItAnchor, {
|
||||
permalink: markdownItAnchor.permalink.linkInsideHeader({
|
||||
placement: 'before',
|
||||
class: '',
|
||||
class: 'header-anchor',
|
||||
symbol: '',
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -193,3 +193,17 @@
|
||||
.token.space:before {
|
||||
color: #3c526d;
|
||||
}
|
||||
|
||||
.header-anchor {
|
||||
pointer-events: none;
|
||||
}
|
||||
.header-anchor::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 75px;
|
||||
margin-top: -75px;
|
||||
visibility: hidden;
|
||||
}
|
||||
.header-anchor:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user