Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix anchor scroll position [fixes #832] #841

Merged
merged 1 commit into from
Mar 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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