Skip to content

fix: offset heading anchors to compensate for nav - #79

Merged
GBKS merged 1 commit into
BitcoinDesign:masterfrom
johnsBeharry:hotfix/offset-heading-anchors
Dec 21, 2020
Merged

GBKS merged 1 commit into
BitcoinDesign:masterfrom
johnsBeharry:hotfix/offset-heading-anchors

Conversation

@johnsBeharry

Copy link
Copy Markdown
Contributor

Problem

Given the site has a fixed header
When I click on a named anchor link 
And the page scrolls to the heading
Then the heading is out of view because the header is blocking

anchor-offset-problem

Solution

  • Add an offset to the heading

Result

anchor-offset-solution

@johnsBeharry johnsBeharry added the Dev Development-focused tasks. label Dec 15, 2020
@johnsBeharry johnsBeharry self-assigned this Dec 15, 2020
@GBKS

GBKS commented Dec 16, 2020

Copy link
Copy Markdown
Contributor

Good catch. Wouldn't it be easier to use padding-top instead of inserting a pseudo-element?

@johnsBeharry

Copy link
Copy Markdown
Contributor Author

@GBKS ye found it when reviewing #48

Wouldn't it be easier to use padding-top instead of inserting a pseudo-element?

cause then that would increase the amount of space between the elements. i didn't want to make any visible changes to vertical spacing.

@GBKS

GBKS commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

We'll have to revise that whole spacing system at some point, it just looks unrefined right now, particularly on the glossary page. But that's for another time. So I'm cool with this change. ACK it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dev Development-focused tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants