fix: Offset headers when scrolling from TOC to account for fixed header

closes #1578
This commit is contained in:
Tom Moor
2020-10-19 23:07:37 -07:00
parent 758fcc1759
commit 4103f53f2a

View File

@@ -101,6 +101,15 @@ const StyledEditor = styled(RichMarkdownEditor)`
cursor: default;
}
/* pseudo element allows us to add spacing for fixed header */
/* ref: https://stackoverflow.com/a/28824157 */
.heading-name::before {
content: "";
display: block;
height: 72px;
margin: -72px 0 0;
}
p {
a {
color: ${(props) => props.theme.text};