refactor(blog): use scroll margin

This commit is contained in:
Kim, Jimin 2023-06-29 14:14:42 +09:00
parent cb8ba18eec
commit 2eca674fd2
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,6 @@ export default css`
a.header-anchor {
/* compensate for navbar height*/
display: inline-block;
margin-top: 4.5rem;
color: ${(props) => props.theme.theme.component.anchor.color.header};
}
@ -27,6 +26,5 @@ export default css`
/* footnote anchors */
a[id^="fnref"] {
display: inline;
padding-top: 4.5rem;
}
`

View file

@ -50,6 +50,7 @@ const globalCSS = css`
* {
transition: color 0.1s linear;
scroll-behavior: smooth;
scroll-margin: 4rem;
}
`

View file

@ -7,7 +7,8 @@ export default css`
h4,
h5,
h6 {
margin-top: -2rem;
margin-top: 3rem;
padding-top: 0.5rem;
margin-bottom: 0.5rem;
font-weight: 700;
}