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

AnchorProvider offset not working #14

Open
clns opened this issue Feb 7, 2024 · 1 comment
Open

AnchorProvider offset not working #14

clns opened this issue Feb 7, 2024 · 1 comment

Comments

@clns
Copy link

clns commented Feb 7, 2024

The AnchorProvider.offset doesn't seem to work. It always scrolls to the top of the viewport.

Am I missing something?

@clns
Copy link
Author

clns commented Feb 7, 2024

You can work around it by using the following style on AnchorSection:

const anchorOffset = 58;
<AnchorSection id="id" style={{ position: 'relative', display: 'block', top: -anchorOffset + 'px' }} />

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

No branches or pull requests

1 participant