From 1a9544eb12cfe83ed88d210add8417457c27d840 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 14 Nov 2023 12:10:41 +0100 Subject: [PATCH] Improve display of crate name when hovered --- src/librustdoc/html/static/css/rustdoc.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 9efdcd601170..ae132d8d465b 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -554,7 +554,7 @@ ul.block, .block li { .sidebar-crate h2 a { display: block; - margin: 0 calc(-24px + 0.25rem) 0 -0.5rem; + margin: 0 calc(-24px + 0.25rem) 0 -0.2rem; /* Align the sidebar crate link with the search bar, which have different font sizes. @@ -569,7 +569,7 @@ ul.block, .block li { x = ( 16px - 0.57rem ) / 2 */ padding: calc( ( 16px - 0.57rem ) / 2 ) 0.25rem; - padding-left: 0.5rem; + padding-left: 0.2rem; } .sidebar-crate h2 .version { @@ -578,7 +578,7 @@ ul.block, .block li { font-size: 1rem; overflow-wrap: break-word; /* opposite of the link padding, cut in half again */ - margin-top: calc( ( -16px + 0.57rem ) / 2 ); + margin-top: calc( ( -4px + 0.57rem ) / 2 ); } .sidebar-crate + .version {