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