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

Highlight/Indicate anchor selected entry #730

Open
tadman opened this issue Apr 12, 2021 · 3 comments
Open

Highlight/Indicate anchor selected entry #730

tadman opened this issue Apr 12, 2021 · 3 comments

Comments

@tadman
Copy link

tadman commented Apr 12, 2021

When searching for some entries you get "stuck", the page cannot scroll to the top for lack of space, which makes it hard to identify which entry it's actually trying to show.

Example: https://rubyapi.org/3.0/o/exception#method-i-full_message

It'd be nice if there was some JavaScript that could apply a light CSS effect of some kind to indicate which anchor tag was selected.

@AlexWayfer
Copy link
Contributor

  1. This is default in Web and globally OK.
  2. Ruby-Doc.org has the same behavior, example: https://ruby-doc.org/core-3.0.1/Object.html#method-i-untrust

But I can agree that we can make it more noticeable, I was confused too sometimes.

@tadman
Copy link
Author

tadman commented Apr 15, 2021

Yeah, it's a very old web convention, and while it works fine for things like Wikipedia headers, the sections in Ruby docs can often be quite tiny and cluttered together with others, making it harder to pin down what I'm supposed to be looking at.

@natematykiewicz
Copy link
Contributor

We can use the :target css selector to style the currently selected anchor.

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

No branches or pull requests

3 participants