Skip to content

Commit 2040dae

Browse files
committed
Make the rustdoc sidebar white on src pages
Fixes #40724
1 parent 07a3429 commit 2040dae

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/librustdoc/html/layout.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ r##"<!DOCTYPE html>
5454
{favicon}
5555
{in_header}
5656
</head>
57-
<body class="rustdoc">
57+
<body class="rustdoc {css_class}">
5858
<!--[if lte IE 8]>
5959
<div class="warning">
6060
This old browser is unsupported and will most likely display funky
@@ -80,7 +80,7 @@ r##"<!DOCTYPE html>
8080
</form>
8181
</nav>
8282
83-
<section id='main' class="content {css_class}">{content}</section>
83+
<section id='main' class="content">{content}</section>
8484
<section id='search' class="content hidden"></section>
8585
8686
<section class="footer"></section>

src/librustdoc/html/static/rustdoc.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ pre {
141141
padding: 14px;
142142
}
143143

144-
.source pre {
144+
.source .content pre {
145145
padding: 20px;
146146
}
147147

148148
img {
149149
max-width: 100%;
150150
}
151151

152-
.content.source {
152+
.source .content {
153153
margin-top: 50px;
154154
max-width: none;
155155
overflow: visible;
@@ -231,7 +231,7 @@ nav.sub {
231231
padding: 15px 0;
232232
}
233233

234-
.content.source pre.rust {
234+
.source .content pre.rust {
235235
white-space: pre;
236236
overflow: auto;
237237
padding-left: 0;

src/librustdoc/html/static/styles/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ pre {
4545
background-color: #fff;
4646
}
4747

48+
.source .sidebar {
49+
background-color: #fff;
50+
}
51+
4852
.sidebar .location {
4953
border-color: #000;
5054
background-color: #fff;

0 commit comments

Comments
 (0)