Skip to content

Commit 6f9b988

Browse files
Move scrollbar on the <main> element rather than only on the code block to improve UX
1 parent 1767585 commit 6f9b988

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ img {
392392
overflow-x: hidden;
393393
/* The sidebar is by default hidden */
394394
overflow-y: hidden;
395+
z-index: 1;
395396
}
396397

397398
.sidebar, .mobile-topbar, .sidebar-menu-toggle,
@@ -535,6 +536,9 @@ ul.block, .block li {
535536
.rustdoc .example-wrap > pre {
536537
margin: 0;
537538
flex-grow: 1;
539+
}
540+
541+
.rustdoc:not(.source) .example-wrap > pre {
538542
overflow: auto hidden;
539543
}
540544

0 commit comments

Comments
 (0)