Skip to content

Commit

Permalink
Merge pull request #841 from carlfairclough/anchor-fix-832
Browse files Browse the repository at this point in the history
fix anchor scroll position [fixes #832]
  • Loading branch information
samajammin authored Mar 18, 2020
2 parents 0dd26d4 + 1daac48 commit 35f8f85
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/.vuepress/theme/styles/theme.styl
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,9 @@ table
// These target mainly our markdown content, and whenever a .l# class is not used
// They should eventually be moved out of utils.styl

h1, h2, h3, h4, h5, h6, p, span, li {
h1, h2, h3, h4, h5, h6, p, span, li
max-width: $contentWidth;
// This prevents content from being hidden from the fixed header when an anchor tag is used
&:target:before {
content: "";
display: block;
height: 60px; /* fixed header height*/
margin: -60px 0 0; /* negative fixed header height */
}
}


h1:not(.l1):not(.l2):not(.l3):not(.l4):not(.l5):not(.l6):not(.l7):not(.l8)
@extend .l1
Expand Down Expand Up @@ -217,6 +210,13 @@ p
&.highlight
background url(../images/highlight.svg)
background-repeat no-repeat
h2, h3
&:before
display: block;
content: " ";
margin-top: -120px;
height: 120px;
visibility: hidden;

:not(.rtl)
.content__default
Expand Down

0 comments on commit 35f8f85

Please sign in to comment.