]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/css/themes/ayu.css
Rollup merge of #91055 - lcnr:type_of-closures, r=nikomatsakis
[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: #ffa0a5; }
171 .content span.union, .content a.union { color: #ffa0a5; }
172 .content span.constant, .content a.constant,
173 .content span.static, .content a.static { color: #39AFD7; }
174 .content span.primitive, .content a.primitive { color: #ffa0a5; }
175 .content span.traitalias, .content a.traitalias { color: #39AFD7; }
176 .content span.keyword, .content a.keyword { color: #39AFD7; }
177
178 .content span.externcrate, .content span.mod, .content a.mod {
179         color: #39AFD7;
180 }
181 .content span.struct, .content a.struct {
182         color: #ffa0a5;
183 }
184 .content span.enum, .content a.enum {
185         color: #ffa0a5;
186 }
187 .content span.trait, .content a.trait {
188         color: #39AFD7;
189 }
190 .content span.type, .content a.type {
191         color: #39AFD7;
192 }
193 .content span.type,
194 .content a.type,
195 .block a.current.type { color: #39AFD7; }
196 .content span.associatedtype,
197 .content a.associatedtype,
198 .block a.current.associatedtype { color: #39AFD7; }
199 .content span.fn, .content a.fn, .content span.method,
200 .content a.method, .content span.tymethod,
201 .content a.tymethod, .content .fnname {
202         color: #fdd687;
203 }
204 .content span.attr, .content a.attr, .content span.derive,
205 .content a.derive, .content span.macro, .content a.macro {
206         color: #a37acc;
207 }
208
209 pre.rust .comment { color: #788797; }
210 pre.rust .doccomment { color: #a1ac88; }
211
212 nav:not(.sidebar) {
213         border-bottom-color: #424c57;
214 }
215 nav.main .current {
216         border-top-color: #5c6773;
217         border-bottom-color: #5c6773;
218 }
219 nav.main .separator {
220         border: 1px solid #5c6773;
221 }
222 a {
223         color: #39AFD7;
224 }
225 a.srclink,
226 a#toggle-all-docs,
227 a.anchor,
228 .small-section-header a,
229 #source-sidebar a,
230 pre.rust a,
231 .sidebar a,
232 .in-band a {
233         color: #c5c5c5;
234 }
235 .search-results a {
236         color: #0096cf;
237 }
238 body.source .example-wrap pre.rust a {
239         background: #333;
240 }
241
242 details.rustdoc-toggle > summary.hideme > span,
243 details.rustdoc-toggle > summary::before,
244 details.undocumented > summary::before {
245         color: #999;
246 }
247
248 details.rustdoc-toggle > summary::before,
249 details.undocumented > summary::before {
250         filter: invert(100%);
251 }
252
253 #crate-search {
254         color: #c5c5c5;
255         background-color: #141920;
256         box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
257         border-color: #424c57;
258 }
259
260 .search-input {
261         color: #ffffff;
262         background-color: #141920;
263         box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
264         transition: box-shadow 150ms ease-in-out;
265 }
266
267 #crate-search+.search-input:focus {
268         box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
269 }
270
271 .module-item .stab,
272 .import-item .stab {
273         color: #000;
274 }
275
276 .stab.unstable,
277 .stab.deprecated,
278 .stab.portability {
279         color: #c5c5c5;
280         background: #314559 !important;
281         border-style: none !important;
282         border-radius: 4px;
283         padding: 3px 6px 3px 6px;
284 }
285
286 .stab.portability > code {
287         color: #e6e1cf;
288         background: none;
289 }
290
291 #help > div {
292         background: #14191f;
293         box-shadow: 0px 6px 20px 0px black;
294         border: none;
295         border-radius: 4px;
296 }
297
298 #help span.bottom, #help span.top {
299         border-color: #5c6773;
300 }
301
302 .since {
303         color: grey;
304 }
305
306 .result-name .primitive > i, .result-name .keyword > i {
307         color: #788797;
308 }
309
310 .line-numbers :target { background-color: transparent; }
311
312 /* Code highlighting */
313 pre.rust .number, pre.rust .string { color: #b8cc52; }
314 pre.rust .kw, pre.rust .kw-2, pre.rust .prelude-ty,
315 pre.rust .bool-val, pre.rust .prelude-val,
316 pre.rust .op, pre.rust .lifetime { color: #ff7733; }
317 pre.rust .macro, pre.rust .macro-nonterminal { color: #a37acc; }
318 pre.rust .question-mark {
319         color: #ff9011;
320 }
321 pre.rust .self {
322         color: #36a3d9;
323         font-style: italic;
324 }
325 pre.rust .attribute {
326         color: #e6e1cf;
327 }
328 pre.rust .attribute .ident, pre.rust .attribute .op {
329         color: #e6e1cf;
330 }
331
332 .example-wrap > pre.line-number {
333         color: #5c67736e;
334         border: none;
335 }
336
337 a.test-arrow {
338         font-size: 100%;
339         color: #788797;
340         border-radius: 4px;
341         background-color: rgba(57, 175, 215, 0.09);
342 }
343
344 a.test-arrow:hover {
345         background-color: rgba(57, 175, 215, 0.368);
346         color: #c5c5c5;
347 }
348
349 .toggle-label,
350 .code-attribute {
351         color: #999;
352 }
353
354 :target {
355         background: rgba(255, 236, 164, 0.06);
356         border-right: 3px solid rgba(255, 180, 76, 0.85);
357 }
358
359 pre.compile_fail {
360         border-left: 2px solid rgba(255,0,0,.4);
361 }
362
363 pre.compile_fail:hover, .information:hover + pre.compile_fail {
364         border-left: 2px solid #f00;
365 }
366
367 pre.should_panic {
368         border-left: 2px solid rgba(255,0,0,.4);
369 }
370
371 pre.should_panic:hover, .information:hover + pre.should_panic {
372         border-left: 2px solid #f00;
373 }
374
375 pre.ignore {
376         border-left: 2px solid rgba(255,142,0,.6);
377 }
378
379 pre.ignore:hover, .information:hover + pre.ignore {
380         border-left: 2px solid #ff9200;
381 }
382
383 .tooltip.compile_fail {
384         color: rgba(255,0,0,.5);
385 }
386
387 .information > .compile_fail:hover {
388         color: #f00;
389 }
390
391 .tooltip.should_panic {
392         color: rgba(255,0,0,.5);
393 }
394
395 .information > .should_panic:hover {
396         color: #f00;
397 }
398
399 .tooltip.ignore {
400         color: rgba(255,142,0,.6);
401 }
402
403 .information > .ignore:hover {
404         color: #ff9200;
405 }
406
407 .search-failed a {
408         color: #39AFD7;
409 }
410
411 .tooltip::after {
412         background-color: #314559;
413         color: #c5c5c5;
414         border: 1px solid #5c6773;
415 }
416
417 .tooltip::before {
418         border-color: transparent #314559 transparent transparent;
419 }
420
421 .notable-traits-tooltiptext {
422         background-color: #314559;
423         border-color: #5c6773;
424 }
425
426 .notable-traits-tooltiptext .notable {
427         border-bottom-color: #5c6773;
428 }
429
430 #titles > button.selected {
431         background-color: #141920 !important;
432         border-bottom: 1px solid #ffb44c !important;
433         border-top: none;
434 }
435
436 #titles > button:not(.selected) {
437         background-color: transparent !important;
438         border: none;
439 }
440
441 #titles > button:hover {
442         border-bottom: 1px solid rgba(242, 151, 24, 0.3);
443 }
444
445 #titles > button > div.count {
446         color: #888;
447 }
448
449 /* rules that this theme does not need to set, here to satisfy the rule checker */
450 /* note that a lot of these are partially set in some way (meaning they are set
451 individually rather than as a group) */
452 /* FIXME: these rules should be at the bottom of the file but currently must be
453 above the `@media (max-width: 700px)` rules due to a bug in the css checker */
454 /* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
455 .search-input:focus {}
456 .content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,
457 .block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
458 .content span.struct,.content a.struct,.block a.current.struct {}
459 #titles>button:hover,#titles>button.selected {}
460 .content span.typedef,.content a.typedef,.block a.current.typedef {}
461 .content span.union,.content a.union,.block a.current.union {}
462 pre.rust .lifetime {}
463 .stab.unstable {}
464 h2,
465 h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {}
466 .content span.enum,.content a.enum,.block a.current.enum {}
467 .content span.constant,.content a.constant,.block a.current.constant,.content span.static,
468 .content a.static, .block a.current.static {}
469 .content span.keyword,.content a.keyword,.block a.current.keyword {}
470 pre.rust .comment {}
471 .content span.traitalias,.content a.traitalias,.block a.current.traitalias {}
472 .content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,
473 .block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,
474 .content .fnname {}
475 pre.rust .kw {}
476 pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,
477 pre.rust .attribute .ident {}
478 .content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {}
479 pre.rust .doccomment {}
480 .stab.deprecated {}
481 .content a.attr,.content a.derive,.content a.macro {}
482 .stab.portability {}
483 .content span.primitive,.content a.primitive,.block a.current.primitive {}
484 .content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod {}
485 pre.rust .kw-2,pre.rust .prelude-ty {}
486 .content span.trait,.content a.trait,.block a.current.trait {}
487
488 .search-results a:focus span {}
489 a.result-trait:focus {}
490 a.result-traitalias:focus {}
491 a.result-mod:focus,
492 a.result-externcrate:focus {}
493 a.result-mod:focus {}
494 a.result-externcrate:focus {}
495 a.result-enum:focus {}
496 a.result-struct:focus {}
497 a.result-union:focus {}
498 a.result-fn:focus,
499 a.result-method:focus,
500 a.result-tymethod:focus {}
501 a.result-type:focus {}
502 a.result-associatedtype:focus {}
503 a.result-foreigntype:focus {}
504 a.result-attr:focus,
505 a.result-derive:focus,
506 a.result-macro:focus {}
507 a.result-constant:focus,
508 a.result-static:focus {}
509 a.result-primitive:focus {}
510 a.result-keyword:focus {}
511
512 @media (max-width: 700px) {
513         .sidebar-menu {
514                 background-color: #14191f;
515                 border-bottom-color: #5c6773;
516                 border-right-color: #5c6773;
517         }
518
519         .sidebar-elems {
520                 background-color: #14191f;
521                 border-right-color: #5c6773;
522         }
523
524         #sidebar-filler {
525                 background-color: #14191f;
526                 border-bottom-color: #5c6773;
527         }
528 }
529
530 kbd {
531         color: #c5c5c5;
532         background-color: #314559;
533         border-color: #5c6773;
534         border-bottom-color: #5c6773;
535         box-shadow-color: #c6cbd1;
536 }
537
538 #theme-picker, #settings-menu, #help-button {
539         border-color: #5c6773;
540         background-color: #0f1419;
541         color: #fff;
542 }
543
544 #theme-picker > img, #settings-menu > img {
545         filter: invert(100);
546 }
547
548 #copy-path {
549         color: #fff;
550 }
551 #copy-path > img {
552         filter: invert(70%);
553 }
554 #copy-path:hover > img {
555         filter: invert(100%);
556 }
557
558 #theme-picker:hover, #theme-picker:focus,
559 #settings-menu:hover, #settings-menu:focus,
560 #help-button:hover, #help-button:focus {
561         border-color: #e0e0e0;
562 }
563
564 #theme-choices {
565         border-color: #5c6773;
566         background-color: #0f1419;
567 }
568
569 #theme-choices > button:not(:first-child) {
570         border-top-color: #5c6773;
571 }
572
573 #theme-choices > button:hover, #theme-choices > button:focus {
574         background-color: rgba(110, 110, 110, 0.33);
575 }
576
577 @media (max-width: 700px) {
578         #theme-picker {
579                 background: #0f1419;
580         }
581 }
582
583 #all-types {
584         background-color: #14191f;
585 }
586 #all-types:hover {
587         background-color: rgba(70, 70, 70, 0.33);
588 }
589
590 .search-results .result-name span.alias {
591         color: #c5c5c5;
592 }
593 .search-results .result-name span.grey {
594         color: #999;
595 }
596
597 #sidebar-toggle {
598         background-color: #14191f;
599 }
600 #sidebar-toggle:hover {
601         background-color: rgba(70, 70, 70, 0.33);
602 }
603 #source-sidebar {
604         background-color: #14191f;
605 }
606 #source-sidebar > .title {
607         color: #fff;
608         border-bottom-color: #5c6773;
609 }
610 div.files > a:hover, div.name:hover {
611         background-color: #14191f;
612         color: #ffb44c;
613 }
614 div.files > .selected {
615         background-color: #14191f;
616         color: #ffb44c;
617 }
618 .setting-line > .title {
619         border-bottom-color: #5c6773;
620 }
621 input:checked + .slider {
622         background-color: #ffb454 !important;
623 }
624
625 .scraped-example .example-wrap .rust span.highlight {
626         background: rgb(91, 59, 1);
627 }
628 .scraped-example .example-wrap .rust span.highlight.focus {
629         background: rgb(124, 75, 15);
630 }
631 .scraped-example:not(.expanded) .code-wrapper:before {
632         background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
633 }
634 .scraped-example:not(.expanded) .code-wrapper:after {
635         background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
636 }
637 .toggle-line-inner {
638         background: #616161;
639 }
640 .toggle-line:hover .toggle-line-inner {
641         background: ##898989;
642 }