Skip to content

Commit 3199aeb

Browse files
authored
Rollup merge of #74067 - rye:rustdoc-fqn-hover-underline, r=GuillaumeGomez
rustdoc: Restore underline text decoration on hover for FQN in header This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation. 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. <details><summary>📸 Before, mouse hovered over "net" in the FQN</summary> <img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" /> </details> <details><summary>📸 After, mouse hovered over "net" in the FQN</summary> <img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" /> </details>
2 parents 7d7b3e6 + 2f31426 commit 3199aeb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustdoc/html/static/rustdoc.css

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ h1.fqn {
100100
border-bottom: 1px dashed;
101101
margin-top: 0;
102102
}
103+
h1.fqn > .in-band > a:hover {
104+
text-decoration: underline;
105+
}
103106
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
104107
border-bottom: 1px solid;
105108
}

0 commit comments

Comments
 (0)