refactor(blog): use scroll margin
This commit is contained in:
parent
cb8ba18eec
commit
2eca674fd2
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
`
|
||||
|
|
|
@ -50,6 +50,7 @@ const globalCSS = css`
|
|||
* {
|
||||
transition: color 0.1s linear;
|
||||
scroll-behavior: smooth;
|
||||
scroll-margin: 4rem;
|
||||
}
|
||||
`
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue