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

View file

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

View file

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