Skip to content

Commit e2a2500

Browse files
Fix search sidebar width when no crate select is present
1 parent 96d565b commit e2a2500

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
@@ -658,18 +658,18 @@ a {
658658
transition: border-color 300ms ease;
659659
transition: border-radius 300ms ease-in-out;
660660
transition: box-shadow 300ms ease-in-out;
661-
width: calc(100% - 32px);
661+
width: 100%;
662662
}
663663

664664
#crate-search + .search-input {
665665
border-radius: 0 1px 1px 0;
666+
width: calc(100% - 32px);
666667
}
667668

668669
.search-input:focus {
669670
border-radius: 2px;
670671
border: 0;
671672
outline: 0;
672-
box-shadow: 0 0 8px #078dd8;
673673
}
674674

675675
.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)