Skip to content

Commit 4371f21

Browse files
wesleywiseralexcrichton
authored andcommitted
Make the rustdoc sidebar white on src pages
Fixes #40724
1 parent 89f645e commit 4371f21

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/librustdoc/html/layout.rs

+2-2
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

+3-3
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

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ pre {
5353
background-color: #fff;
5454
}
5555

56+
.source .sidebar {
57+
background-color: #fff;
58+
}
59+
5660
.sidebar .location {
5761
border-color: #000;
5862
background-color: #fff;
@@ -187,4 +191,4 @@ a.test-arrow:hover{
187191

188192
:target > code {
189193
background: #FDFFD3;
190-
}
194+
}

0 commit comments

Comments
 (0)