-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
[site] fix: anchor offset #1637
Conversation
when navigating through an anchor
make it use tailwind styles
site/src/styles.css
Outdated
@apply content-['']; | ||
@apply block; | ||
@apply h-16; | ||
@apply -mt-16; | ||
@apply invisible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apply content-['']; | |
@apply block; | |
@apply h-16; | |
@apply -mt-16; | |
@apply invisible; | |
@apply content-[''] block h-16 -mt-16 invisible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jaskon did you check the change on mobile? Height of the header on mobile is different from desktop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Have fixed it for mobiles.
use different header size on mobiles and desktops
Anchor offset when navigating through an anchor.
It's now scrolling a bit further, to make a section-header also visible on the screen.
(Previously, selected section-header was hidden under the global page-header)
Unfortunately, I don't know how to get rid of the outline, when navigation through an anchor, as it's applied to the parent of styled element. The only way I see here - modify markdown-it-anchor sources (or use some different approach here)