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

[site] fix: anchor offset #1637

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Conversation

Jaskon
Copy link
Contributor

@Jaskon Jaskon commented Jun 6, 2023

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)

image

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)

when navigating through an anchor
make it use tailwind styles
@Jaskon Jaskon requested a review from umputun as a code owner June 6, 2023 16:04
@umputun umputun requested a review from akellbl4 June 6, 2023 16:18
Comment on lines 201 to 205
@apply content-[''];
@apply block;
@apply h-16;
@apply -mt-16;
@apply invisible;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@apply content-[''];
@apply block;
@apply h-16;
@apply -mt-16;
@apply invisible;
@apply content-[''] block h-16 -mt-16 invisible;

Copy link
Collaborator

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.

Copy link
Contributor Author

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
@Jaskon Jaskon requested a review from akellbl4 June 6, 2023 18:29
@umputun umputun merged commit 68504a7 into umputun:master Jun 6, 2023
1 check passed
@paskal paskal added this to the v1.12.0 milestone Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants