Skip to content

Commit ef6c026

Browse files
authored
Improve ayu rustdoc theme
* It makes some lines darker * It gives the crate selector and search bar a border * The search bar's border turns blue when focused * Gives the logo a bright shadow. This makes dark logos stand out more
1 parent 7e11379 commit ef6c026

File tree

1 file changed

+11
-9
lines changed
  • src/librustdoc/html/static/themes

1 file changed

+11
-9
lines changed

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

+11-9
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ pre {
7070
scrollbar-color: #5c6773 transparent;
7171
}
7272

73+
.logo-container > img {
74+
/* Make dark logos better visible in supported browsers */
75+
filter: drop-shadow(0 0 30px rgba(255,255,255,0.7));
76+
}
77+
7378
/* Improve the scrollbar display on webkit-based browsers */
7479
::-webkit-scrollbar-track {
7580
background-color: transparent;
@@ -108,7 +113,7 @@ pre {
108113
}
109114

110115
.sidebar .version {
111-
border-bottom-color: #DDD;
116+
border-bottom-color: #424c57;
112117
}
113118

114119
.sidebar-title {
@@ -198,7 +203,7 @@ pre.rust .comment, pre.rust .doccomment {
198203
}
199204

200205
nav:not(.sidebar) {
201-
border-bottom-color: #e0e0e0;
206+
border-bottom-color: #424c57;
202207
}
203208
nav.main .current {
204209
border-top-color: #5c6773;
@@ -227,22 +232,19 @@ a {
227232
#crate-search {
228233
color: #c5c5c5;
229234
background-color: #141920;
230-
border-radius: 4px;
231-
box-shadow: none;
232-
border-color: #5c6773;
235+
box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
236+
border-color: #424c57;
233237
}
234238

235239
.search-input {
236240
color: #ffffff;
237241
background-color: #141920;
238-
box-shadow: none;
242+
box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
239243
transition: box-shadow 150ms ease-in-out;
240-
border-radius: 4px;
241-
margin-left: 8px;
242244
}
243245

244246
#crate-search+.search-input:focus {
245-
box-shadow: 0px 6px 20px 0px black;
247+
box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
246248
}
247249

248250
.search-focus:disabled {

0 commit comments

Comments
 (0)