Commit aefa307
authored
Rollup merge of rust-lang#53047 - integer32llc:rustdoc-clicky-clicky, r=QuietMisdreavus
Make entire row of doc search results clickable
By adding empty `after` content that clears and is `display: block`.
Technique found here: https://stackoverflow.com/a/7817313/51683
Now any part of a documentation search result that is highlighted when
you hover over it should also be clickable.
NOTE: THE BELOW IMAGES ARE GIFS BUT I DIDN'T MAKE THEM LOOP, OPEN IN A NEW TAB TO SEE THEM SORRY SORRY
Here's what happens before this change: my mouse cursor is in the middle of the table cell, and the row is highlighted which makes it look like clicking should have an effect, but clicking doesn't do anything:

After this change, clicking in the middle of the cell works!

It even works nicely when the type is really long and wraps! (I created the type artificially because I couldn't find a long enough one in the wild)
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
618 | 623 | | |
619 | 624 | | |
620 | 625 | | |
| |||
0 commit comments