nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Highlighted anchor links are too offset

Open pacocoursey opened this issue 5 years ago • 0 comments

On pages like https://swr.vercel.app/docs/options#return-values, the sidebar highlighted item is "Options" instead of "Return Values" because we don't trigger the active sidebar item until we scroll up a bit further.

We should change this offset to ensure that if we just clicked an anchor link, the correct anchor is highlighted in the sidebar.

https://github.com/shuding/nextra/blob/1adf1c7db8ecdda2c6e1f0a2079ea139d76e09ea/packages/nextra-theme-docs/src/misc/theme.js#L59-L72

pacocoursey avatar Jan 19 '21 17:01 pacocoursey