Skip to content

Commit 96e6cfa

Browse files
Improve display of crate name when hovered
1 parent 5bd5d21 commit 96e6cfa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustdoc/html/static/css/rustdoc.css

+2-4
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ ul.block, .block li {
638638

639639
.sidebar-crate h2 a {
640640
display: block;
641-
margin: 0 calc(-24px + 0.25rem) 0 -0.5rem;
641+
margin: 0 calc(-24px + 0.25rem) 0 -0.2rem;
642642
/* Align the sidebar crate link with the search bar, which have different
643643
font sizes.
644644
@@ -653,16 +653,14 @@ ul.block, .block li {
653653
x = ( 16px - 0.57rem ) / 2
654654
*/
655655
padding: calc( ( 16px - 0.57rem ) / 2 ) 0.25rem;
656-
padding-left: 0.5rem;
656+
padding-left: 0.2rem;
657657
}
658658

659659
.sidebar-crate h2 .version {
660660
display: block;
661661
font-weight: normal;
662662
font-size: 1rem;
663663
overflow-wrap: break-word;
664-
/* opposite of the link padding, cut in half again */
665-
margin-top: calc( ( -16px + 0.57rem ) / 2 );
666664
}
667665

668666
.sidebar-crate + .version {

0 commit comments

Comments
 (0)