Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve display of crate name when hovered #117906

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,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.

Expand All @@ -653,16 +653,14 @@ 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 {
display: block;
font-weight: normal;
font-size: 1rem;
overflow-wrap: break-word;
/* opposite of the link padding, cut in half again */
margin-top: calc( ( -16px + 0.57rem ) / 2 );
}

.sidebar-crate + .version {
Expand Down
Loading