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

x/pkgsite: anchor links to package-scoped constants and variables appear off-screen #38575

Closed
dmitshur opened this issue Apr 21, 2020 · 2 comments
Closed

Comments

@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Apr 21, 2020

Consider the following link to a package-scoped variable (but this applies to constants too):

https://pkg.go.dev/io#ErrShortWrite

I expect to be able to use it to see and point other people to the io.ErrShortWrite variable and its documentation. It largely works, but the ErrShortWrite variable shows up slightly off-screen, covered up by the sticky header:

image

It would be better if it weren't covered up, like so:

image

This minor problem doesn't affect godoc.org and golang.org/pkg:

image

image

/cc @julieqiu

@julieqiu julieqiu removed the UX label Apr 22, 2020
@julieqiu julieqiu changed the title pkg.go.dev: anchor links to package-scoped constants and variables appear off-screen x/pkgsite: anchor links to package-scoped constants and variables appear off-screen Jun 15, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/dochtml Aug 19, 2020
@dmitshur
Copy link
Contributor Author

@dmitshur dmitshur commented Nov 27, 2020

Maybe the scroll-margin-top CSS property can be useful here. (I saw it mentioned recently here.)

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 14, 2021

Change https://golang.org/cl/283955 mentions this issue: content,internal: fix anchor target links for constants and variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants