]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/themes/ayu.css
Auto merge of #82855 - jyn514:no-temporaries, r=GuillaumeGomez
[rust.git] / src / librustdoc / html / static / themes / ayu.css
1 /*
2 Based off of the Ayu theme
3 Original by Dempfi (https://github.com/dempfi/ayu)
4 */
5
6 /* General structure and fonts */
7
8 body {
9         background-color: #0f1419;
10         color: #c5c5c5;
11 }
12
13 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
14 h4:not(.method):not(.type):not(.tymethod) {
15         color: white;
16 }
17 h1.fqn {
18         border-bottom-color: #5c6773;
19 }
20 h1.fqn  a {
21         color: #fff;
22 }
23 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod) {
24         border-bottom-color: #5c6773;
25 }
26 h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
27         border: none;
28 }
29
30 .in-band {
31         background-color: #0f1419;
32 }
33
34 .invisible {
35         background: rgba(0, 0, 0, 0);
36 }
37
38 code {
39         color: #ffb454;
40 }
41 h3 > code, h4 > code, h5 > code {
42         color: #e6e1cf;
43 }
44 pre > code {
45         color: #e6e1cf;
46 }
47 span code {
48         color: #e6e1cf;
49 }
50 .docblock a > code {
51         color: #39AFD7 !important;
52 }
53 .docblock code, .docblock-short code {
54         background-color: #191f26;
55 }
56 pre {
57         color: #e6e1cf;
58         background-color: #191f26;
59 }
60
61 .sidebar {
62         background-color: #14191f;
63 }
64
65 .logo-container.rust-logo > img {
66         filter: drop-shadow(1px 0 0px #fff)
67                 drop-shadow(0 1px 0 #fff)
68                 drop-shadow(-1px 0 0 #fff)
69                 drop-shadow(0 -1px 0 #fff);
70 }
71
72 /* Improve the scrollbar display on firefox */
73 * {
74         scrollbar-color: #5c6773 transparent;
75 }
76
77 .sidebar {
78         scrollbar-color: #5c6773 transparent;
79 }
80
81 /* Improve the scrollbar display on webkit-based browsers */
82 ::-webkit-scrollbar-track {
83         background-color: transparent;
84 }
85 ::-webkit-scrollbar-thumb {
86         background-color: #5c6773;
87 }
88 .sidebar::-webkit-scrollbar-track {
89         background-color: transparent;
90 }
91 .sidebar::-webkit-scrollbar-thumb {
92         background-color: #5c6773;
93 }
94
95 .sidebar .current {
96         background-color: transparent;
97         color: #ffb44c;
98 }
99
100 .source .sidebar {
101         background-color: #0f1419;
102 }
103
104 .sidebar .location {
105         border-color: #000;
106         background-color: #0f1419;
107         color: #fff;
108 }
109
110 .sidebar-elems .location {
111         color: #ff7733;
112 }
113
114 .sidebar-elems .location a {
115         color: #fff;
116 }
117
118 .sidebar .version {
119         border-bottom-color: #424c57;
120 }
121
122 .sidebar-title {
123         border-top-color: #5c6773;
124         border-bottom-color: #5c6773;
125 }
126
127 .block a:hover {
128         background: transparent;
129         color: #ffb44c;
130 }
131
132 .line-numbers span { color: #5c6773; }
133 .line-numbers .line-highlighted {
134         color: #708090;
135         background-color: rgba(255, 236, 164, 0.06);
136         padding-right: 4px;
137         border-right: 1px solid #ffb44c;
138 }
139
140 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
141         border-bottom-color: #5c6773;
142 }
143
144 .docblock table, .docblock table td, .docblock table th {
145         border-color: #5c6773;
146 }
147
148 .content .method .where,
149 .content .fn .where,
150 .content .where.fmt-newline {
151         color: #c5c5c5;
152 }
153
154 .content .highlighted {
155         color: #000 !important;
156         background-color: #c6afb3;
157 }
158 .content .highlighted a, .content .highlighted span { color: #000 !important; }
159 .content .highlighted {
160         background-color: #c6afb3;
161 }
162 .search-results a {
163         color: #0096cf;
164 }
165 .search-results a span.desc {
166         color: #c5c5c5;
167 }
168
169 .content .item-info::before { color: #ccc; }
170
171 .content span.foreigntype, .content a.foreigntype { color: #ef57ff; }
172 .content span.union, .content a.union { color: #98a01c; }
173 .content span.constant, .content a.constant,
174 .content span.static, .content a.static { color: #6380a0; }
175 .content span.primitive, .content a.primitive { color: #32889b; }
176 .content span.traitalias, .content a.traitalias { color: #57d399; }
177 .content span.keyword, .content a.keyword { color: #de5249; }
178
179 .content span.externcrate, .content span.mod, .content a.mod {
180         color: #acccf9;
181 }
182 .content span.struct, .content a.struct {
183         color: #ffa0a5;
184 }
185 .content span.enum, .content a.enum {
186         color: #99e0c9;
187 }
188 .content span.trait, .content a.trait {
189         color: #39AFD7;
190 }
191 .content span.type, .content a.type {
192         color: #cfbcf5;
193 }
194 .content span.fn, .content a.fn, .content span.method,
195 .content a.method, .content span.tymethod,
196 .content a.tymethod, .content .fnname {
197         color: #fdd687;
198 }
199 .content span.attr, .content a.attr, .content span.derive,
200 .content a.derive, .content span.macro, .content a.macro {
201         color: #a37acc;
202 }
203
204 pre.rust .comment { color: #788797; }
205 pre.rust .doccomment { color: #a1ac88; }
206
207 nav:not(.sidebar) {
208         border-bottom-color: #424c57;
209 }
210 nav.main .current {
211         border-top-color: #5c6773;
212         border-bottom-color: #5c6773;
213 }
214 nav.main .separator {
215         border: 1px solid #5c6773;
216 }
217 a {
218         color: #c5c5c5;
219 }
220
221 .docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
222 .docblock-short a:not(.srclink):not(.test-arrow), .item-info a,
223 #help a {
224         color: #39AFD7;
225 }
226
227 .collapse-toggle {
228         color: #999;
229 }
230
231 #crate-search {
232         color: #c5c5c5;
233         background-color: #141920;
234         box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
235         border-color: #424c57;
236 }
237
238 .search-input {
239         color: #ffffff;
240         background-color: #141920;
241         box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
242         transition: box-shadow 150ms ease-in-out;
243 }
244
245 #crate-search+.search-input:focus {
246         box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
247 }
248
249 .search-focus:disabled {
250         color: #929292;
251 }
252
253 .module-item .stab {
254         color: #000;
255 }
256
257 .stab.unstable,
258 .stab.deprecated,
259 .stab.portability {
260         color: #c5c5c5;
261         background: #314559 !important;
262         border-style: none !important;
263         border-radius: 4px;
264         padding: 3px 6px 3px 6px;
265 }
266
267 .stab.portability > code {
268         color: #e6e1cf;
269         background: none;
270 }
271
272 #help > div {
273         background: #14191f;
274         box-shadow: 0px 6px 20px 0px black;
275         border: none;
276         border-radius: 4px;
277 }
278
279 #help > div > span {
280         border-bottom-color: #5c6773;
281 }
282
283 .since {
284         color: grey;
285 }
286
287 tr.result span.primitive::after, tr.result span.keyword::after {
288         color: #788797;
289 }
290
291 .line-numbers :target { background-color: transparent; }
292
293 /* Code highlighting */
294 pre.rust .number, pre.rust .string { color: #b8cc52; }
295 pre.rust .kw, pre.rust .kw-2, pre.rust .prelude-ty,
296 pre.rust .bool-val, pre.rust .prelude-val,
297 pre.rust .op, pre.rust .lifetime { color: #ff7733; }
298 pre.rust .macro, pre.rust .macro-nonterminal { color: #a37acc; }
299 pre.rust .question-mark {
300         color: #ff9011;
301 }
302 pre.rust .self {
303         color: #36a3d9;
304         font-style: italic;
305 }
306 pre.rust .attribute {
307         color: #e6e1cf;
308 }
309 pre.rust .attribute .ident, pre.rust .attribute .op {
310         color: #e6e1cf;
311 }
312
313 .example-wrap > pre.line-number {
314         color: #5c67736e;
315         border: none;
316 }
317
318 a.test-arrow {
319         font-size: 100%;
320         color: #788797;
321         border-radius: 4px;
322         background-color: rgba(57, 175, 215, 0.09);
323 }
324
325 a.test-arrow:hover {
326         background-color: rgba(57, 175, 215, 0.368);
327         color: #c5c5c5;
328 }
329
330 .toggle-label {
331         color: #999;
332 }
333
334 :target > code, :target > .in-band {
335         background: rgba(255, 236, 164, 0.06);
336         border-right: 3px solid rgba(255, 180, 76, 0.85);
337 }
338
339 pre.compile_fail {
340         border-left: 2px solid rgba(255,0,0,.4);
341 }
342
343 pre.compile_fail:hover, .information:hover + pre.compile_fail {
344         border-left: 2px solid #f00;
345 }
346
347 pre.should_panic {
348         border-left: 2px solid rgba(255,0,0,.4);
349 }
350
351 pre.should_panic:hover, .information:hover + pre.should_panic {
352         border-left: 2px solid #f00;
353 }
354
355 pre.ignore {
356         border-left: 2px solid rgba(255,142,0,.6);
357 }
358
359 pre.ignore:hover, .information:hover + pre.ignore {
360         border-left: 2px solid #ff9200;
361 }
362
363 .tooltip.compile_fail {
364         color: rgba(255,0,0,.5);
365 }
366
367 .information > .compile_fail:hover {
368         color: #f00;
369 }
370
371 .tooltip.should_panic {
372         color: rgba(255,0,0,.5);
373 }
374
375 .information > .should_panic:hover {
376         color: #f00;
377 }
378
379 .tooltip.ignore {
380         color: rgba(255,142,0,.6);
381 }
382
383 .information > .ignore:hover {
384         color: #ff9200;
385 }
386
387 .search-failed a {
388         color: #39AFD7;
389 }
390
391 .tooltip::after {
392         background-color: #314559;
393         color: #c5c5c5;
394         border: 1px solid #5c6773;
395 }
396
397 .tooltip::before {
398         border-color: transparent #314559 transparent transparent;
399 }
400
401 .notable-traits-tooltiptext {
402         background-color: #314559;
403         border-color: #5c6773;
404 }
405
406 #titles > button.selected {
407         background-color: #141920 !important;
408         border-bottom: 1px solid #ffb44c !important;
409         border-top: none;
410 }
411
412 #titles > button:not(.selected) {
413         background-color: transparent !important;
414         border: none;
415 }
416
417 #titles > button:hover {
418         border-bottom: 1px solid rgba(242, 151, 24, 0.3);
419 }
420
421 #titles > button > div.count {
422         color: #888;
423 }
424
425 /* rules that this theme does not need to set, here to satisfy the rule checker */
426 /* note that a lot of these are partially set in some way (meaning they are set
427 individually rather than as a group) */
428 /* FIXME: these rules should be at the bottom of the file but currently must be
429 above the `@media (max-width: 700px)` rules due to a bug in the css checker */
430 /* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
431 .content .highlighted.mod, .content .highlighted.externcrate {}
432 .search-input:focus {}
433 .content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,
434 .block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
435 .content .highlighted.trait {}
436 .content span.struct,.content a.struct,.block a.current.struct {}
437 #titles>button:hover,#titles>button.selected {}
438 .content .highlighted.traitalias {}
439 .content span.type,.content a.type,.block a.current.type {}
440 .content span.union,.content a.union,.block a.current.union {}
441 .content .highlighted.foreigntype {}
442 pre.rust .lifetime {}
443 .content .highlighted.primitive {}
444 .content .highlighted.constant,.content .highlighted.static {}
445 .stab.unstable {}
446 .content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod {}
447 h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod) {}
448 .content span.enum,.content a.enum,.block a.current.enum {}
449 .content span.constant,.content a.constant,.block a.current.constant,.content span.static,
450 .content a.static,.block a.current.static {}
451 .content span.keyword,.content a.keyword,.block a.current.keyword {}
452 pre.rust .comment {}
453 .content .highlighted.enum {}
454 .content .highlighted.struct {}
455 .content .highlighted.keyword {}
456 .content span.traitalias,.content a.traitalias,.block a.current.traitalias {}
457 .content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,
458 .block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,
459 .content .fnname {}
460 pre.rust .kw {}
461 pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,
462 pre.rust .attribute .ident {}
463 .content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {}
464 pre.rust .doccomment {}
465 .stab.deprecated {}
466 .content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro {}
467 .stab.portability {}
468 .content .highlighted.union {}
469 .content span.primitive,.content a.primitive,.block a.current.primitive {}
470 .content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod {}
471 .content .highlighted.type {}
472 pre.rust .kw-2,pre.rust .prelude-ty {}
473 .content span.trait,.content a.trait,.block a.current.trait {}
474
475 @media (max-width: 700px) {
476         .sidebar-menu {
477                 background-color: #14191f;
478                 border-bottom-color: #5c6773;
479                 border-right-color: #5c6773;
480         }
481
482         .sidebar-elems {
483                 background-color: #14191f;
484                 border-right-color: #5c6773;
485         }
486
487         #sidebar-filler {
488                 background-color: #14191f;
489                 border-bottom-color: #5c6773;
490         }
491 }
492
493 kbd {
494         color: #c5c5c5;
495         background-color: #314559;
496         border-color: #5c6773;
497         border-bottom-color: #5c6773;
498         box-shadow-color: #c6cbd1;
499 }
500
501 #theme-picker, #settings-menu, .help-button {
502         border-color: #5c6773;
503         background-color: #0f1419;
504         color: #fff;
505 }
506
507 #theme-picker > img, #settings-menu > img {
508         filter: invert(100);
509 }
510
511 #theme-picker:hover, #theme-picker:focus,
512 #settings-menu:hover, #settings-menu:focus,
513 .help-button:hover, .help-button:focus {
514         border-color: #e0e0e0;
515 }
516
517 #theme-choices {
518         border-color: #5c6773;
519         background-color: #0f1419;
520 }
521
522 #theme-choices > button:not(:first-child) {
523         border-top-color: #5c6773;
524 }
525
526 #theme-choices > button:hover, #theme-choices > button:focus {
527         background-color: rgba(110, 110, 110, 0.33);
528 }
529
530 @media (max-width: 700px) {
531         #theme-picker {
532                 background: #0f1419;
533         }
534 }
535
536 #all-types {
537         background-color: #14191f;
538 }
539 #all-types:hover {
540         background-color: rgba(70, 70, 70, 0.33);
541 }
542
543 .search-results td span.alias {
544         color: #c5c5c5;
545 }
546 .search-results td span.grey {
547         color: #999;
548 }
549
550 #sidebar-toggle {
551         background-color: #14191f;
552 }
553 #sidebar-toggle:hover {
554         background-color: rgba(70, 70, 70, 0.33);
555 }
556 #source-sidebar {
557         background-color: #14191f;
558 }
559 #source-sidebar > .title {
560         color: #fff;
561         border-bottom-color: #5c6773;
562 }
563 div.files > a:hover, div.name:hover {
564         background-color: #14191f;
565         color: #ffb44c;
566 }
567 div.files > .selected {
568         background-color: #14191f;
569         color: #ffb44c;
570 }
571 .setting-line > .title {
572         border-bottom-color: #5c6773;
573 }
574 input:checked + .slider {
575         background-color: #ffb454 !important;
576 }