Skip to content

Commit bf54251

Browse files
authored
Rollup merge of rust-lang#60487 - GuillaumeGomez:fix-search-sidebar-width-colors, r=Dylan-DPC
Fix search sidebar width when no crate select is present Fixes rust-lang#60480. I also fixed the box-shadow that seemed to have been kind of removed? r? @QuietMisdreavus
2 parents 5a08ca3 + e2a2500 commit bf54251

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/librustdoc/html/static/rustdoc.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -671,18 +671,18 @@ a {
671671
transition: border-color 300ms ease;
672672
transition: border-radius 300ms ease-in-out;
673673
transition: box-shadow 300ms ease-in-out;
674-
width: calc(100% - 32px);
674+
width: 100%;
675675
}
676676

677677
#crate-search + .search-input {
678678
border-radius: 0 1px 1px 0;
679+
width: calc(100% - 32px);
679680
}
680681

681682
.search-input:focus {
682683
border-radius: 2px;
683684
border: 0;
684685
outline: 0;
685-
box-shadow: 0 0 8px #078dd8;
686686
}
687687

688688
.search-results .desc {

src/librustdoc/html/static/themes/dark.css

+4-3
Original file line numberDiff line numberDiff line change
@@ -164,20 +164,21 @@ a.test-arrow {
164164
color: #111;
165165
background-color: #f0f0f0;
166166
border-color: #000;
167+
box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent;
167168
}
168169

169170
.search-input {
170171
color: #111;
171-
box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent;
172172
background-color: #f0f0f0;
173+
box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent;
173174
}
174175

175176
.search-input:focus {
176177
border-color: #008dfd;
177178
}
178179

179-
#crate-search + .search-input {
180-
box-shadow: 1px 0 0 1px #000, 0 0 0 2px transparent;
180+
#crate-search + .search-input:focus {
181+
box-shadow: 0 0 8px 4px #078dd8;
181182
}
182183

183184
.module-item .stab {

src/librustdoc/html/static/themes/light.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,21 @@ a.test-arrow {
164164
color: #555;
165165
background-color: white;
166166
border-color: #e0e0e0;
167-
box-shadow: 0px 0 0 1px #e0e0e0, 0 0 0 2px transparent;
167+
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
168168
}
169169

170170
.search-input {
171171
color: #555;
172-
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
173172
background-color: white;
173+
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
174174
}
175175

176176
.search-input:focus {
177177
border-color: #66afe9;
178178
}
179179

180-
#crate-search + .search-input {
181-
box-shadow: 1px 0 0 1px #e0e0e0, 0 0 0 2px transparent;
180+
#crate-search + .search-input:focus {
181+
box-shadow: 0 0 8px #078dd8;
182182
}
183183

184184
.module-item .stab {

0 commit comments

Comments
 (0)