Skip to content

Commit

Permalink
rustdoc: Restore underline text decoration on hover for FQN in header
Browse files Browse the repository at this point in the history
This causes the components of FQN's to behave similarly to other links
in the contents of rustdoc-styled pages.

I (and I hope others at least in part) have found the prior design to be
somewhat confusing, as it is not clear (upon hovering) that the various
parts of the FQN are actually links that the user can navigate to.

In short, this patch makes links in the FQN have an underline when the
user hovers over them, more clearly indicating that they can be used for
navigation.

Signed-off-by: Kristofer Rye <[email protected]>
  • Loading branch information
rye committed Jul 5, 2020
1 parent 0cd7ff7 commit 2f31426
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ h1.fqn {
border-bottom: 1px dashed;
margin-top: 0;
}
h1.fqn > .in-band > a:hover {
text-decoration: underline;
}
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
border-bottom: 1px solid;
}
Expand Down

0 comments on commit 2f31426

Please sign in to comment.