mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #104516 - notriddle:notriddle/flex-basis-sidebar-width, r=GuillaumeGomez
rustdoc: clean up sidebar width CSS This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0. This PR should not cause any visual changes. preview: https://notriddle.com/notriddle-rustdoc-demos/flex-basis-sidebar-width/std/index.html [flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
This commit is contained in:
commit
5977fbbc1c
@ -384,8 +384,7 @@ img {
|
||||
|
||||
.sidebar {
|
||||
font-size: 0.875rem;
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
flex: 0 0 200px;
|
||||
overflow-y: scroll;
|
||||
position: sticky;
|
||||
height: 100vh;
|
||||
@ -394,12 +393,7 @@ img {
|
||||
}
|
||||
|
||||
.rustdoc.source .sidebar {
|
||||
width: 50px;
|
||||
min-width: 0px;
|
||||
max-width: 300px;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
flex-basis: auto;
|
||||
flex-basis: 50px;
|
||||
border-right: 1px solid;
|
||||
overflow-x: hidden;
|
||||
/* The sidebar is by default hidden */
|
||||
@ -420,7 +414,7 @@ img {
|
||||
|
||||
.source-sidebar-expanded .source .sidebar {
|
||||
overflow-y: auto;
|
||||
width: 300px;
|
||||
flex-basis: 300px;
|
||||
}
|
||||
|
||||
.source-sidebar-expanded .source .sidebar > *:not(#sidebar-toggle) {
|
||||
@ -1701,6 +1695,7 @@ in storage.js
|
||||
z-index: 11;
|
||||
/* Reduce height slightly to account for mobile topbar. */
|
||||
height: calc(100vh - 45px);
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
|
||||
|
Loading…
Reference in New Issue
Block a user