-
Notifications
You must be signed in to change notification settings - Fork 439
Remove visual highlight for anchored method links #1363
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -579,8 +579,8 @@ main .method-detail { | |
margin-bottom: 2.5em; | ||
} | ||
|
||
main .method-detail:target { | ||
margin-left: -10px; | ||
main .method-detail:target .method-heading { | ||
margin-left: 10px; | ||
border-left: 10px solid var(--border-color); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The value However, this border-left is a highlight of the focused method. Could you suggest a better highlight instead of completely removing it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, that makes sense now. Given that the anchor link reliably brings the method to the top of the viewport, I think we could remove both The method name is easy to spot without extra highlighting. It will look like this if we remove both the border and margin: CleanShot.2025-05-07.at.23.29.28.mp4There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is one of the features of RDoc. I don't want to remove it as possible if it is fixable. This border-left exists in other links to heading tags, not only to method links. Differences are: How about changing the border-left target to heading of the method detail? - main .method-detail:target {
+ main .method-detail:target .method-heading { There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this! Pushed up 212b284 and updated the screenshot in PR body. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you leave the margin-left and border style as is? There is a layout shift. On the other hand, Of course we can discuss adding a padding to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure thing. Sorry for all the back and forth. Updated. |
||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(to revert the change)