Skip to content

[site] fix: anchor offset#1637

Merged
umputun merged 3 commits intoumputun:masterfrom
Jaskon:site/fix/anchor-offset
Jun 6, 2023
Merged

[site] fix: anchor offset#1637
umputun merged 3 commits intoumputun:masterfrom
Jaskon:site/fix/anchor-offset

Conversation

@Jaskon
Copy link
Copy Markdown
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)

Jaskon added 2 commits June 6, 2023 17:25
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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.

4 participants