]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/css/themes/ayu.css
Auto merge of #92314 - Kobzol:encoding-u16-leb128, r=michaelwoerister
[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, :target > * {
355         background: rgba(255, 236, 164, 0.06);
356 }
357
358 :target {
359         border-right: 3px solid rgba(255, 180, 76, 0.85);
360 }
361
362 pre.compile_fail {
363         border-left: 2px solid rgba(255,0,0,.4);
364 }
365
366 pre.compile_fail:hover, .information:hover + pre.compile_fail {
367         border-left: 2px solid #f00;
368 }
369
370 pre.should_panic {
371         border-left: 2px solid rgba(255,0,0,.4);
372 }
373
374 pre.should_panic:hover, .information:hover + pre.should_panic {
375         border-left: 2px solid #f00;
376 }
377
378 pre.ignore {
379         border-left: 2px solid rgba(255,142,0,.6);
380 }
381
382 pre.ignore:hover, .information:hover + pre.ignore {
383         border-left: 2px solid #ff9200;
384 }
385
386 .tooltip.compile_fail {
387         color: rgba(255,0,0,.5);
388 }
389
390 .information > .compile_fail:hover {
391         color: #f00;
392 }
393
394 .tooltip.should_panic {
395         color: rgba(255,0,0,.5);
396 }
397
398 .information > .should_panic:hover {
399         color: #f00;
400 }
401
402 .tooltip.ignore {
403         color: rgba(255,142,0,.6);
404 }
405
406 .information > .ignore:hover {
407         color: #ff9200;
408 }
409
410 .search-failed a {
411         color: #39AFD7;
412 }
413
414 .tooltip::after {
415         background-color: #314559;
416         color: #c5c5c5;
417         border: 1px solid #5c6773;
418 }
419
420 .tooltip::before {
421         border-color: transparent #314559 transparent transparent;
422 }
423
424 .notable-traits-tooltiptext {
425         background-color: #314559;
426         border-color: #5c6773;
427 }
428
429 .notable-traits-tooltiptext .notable {
430         border-bottom-color: #5c6773;
431 }
432
433 #titles > button.selected {
434         background-color: #141920 !important;
435         border-bottom: 1px solid #ffb44c !important;
436         border-top: none;
437 }
438
439 #titles > button:not(.selected) {
440         background-color: transparent !important;
441         border: none;
442 }
443
444 #titles > button:hover {
445         border-bottom: 1px solid rgba(242, 151, 24, 0.3);
446 }
447
448 #titles > button > div.count {
449         color: #888;
450 }
451
452 /* rules that this theme does not need to set, here to satisfy the rule checker */
453 /* note that a lot of these are partially set in some way (meaning they are set
454 individually rather than as a group) */
455 /* FIXME: these rules should be at the bottom of the file but currently must be
456 above the `@media (max-width: 700px)` rules due to a bug in the css checker */
457 /* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
458 .search-input:focus {}
459 .content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,
460 .block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
461 .content span.struct,.content a.struct,.block a.current.struct {}
462 #titles>button:hover,#titles>button.selected {}
463 .content span.typedef,.content a.typedef,.block a.current.typedef {}
464 .content span.union,.content a.union,.block a.current.union {}
465 pre.rust .lifetime {}
466 .stab.unstable {}
467 h2,
468 h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {}
469 .content span.enum,.content a.enum,.block a.current.enum {}
470 .content span.constant,.content a.constant,.block a.current.constant,.content span.static,
471 .content a.static, .block a.current.static {}
472 .content span.keyword,.content a.keyword,.block a.current.keyword {}
473 pre.rust .comment {}
474 .content span.traitalias,.content a.traitalias,.block a.current.traitalias {}
475 .content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,
476 .block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,
477 .content .fnname {}
478 pre.rust .kw {}
479 pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,
480 pre.rust .attribute .ident {}
481 .content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {}
482 pre.rust .doccomment {}
483 .stab.deprecated {}
484 .content a.attr,.content a.derive,.content a.macro {}
485 .stab.portability {}
486 .content span.primitive,.content a.primitive,.block a.current.primitive {}
487 .content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod {}
488 pre.rust .kw-2,pre.rust .prelude-ty {}
489 .content span.trait,.content a.trait,.block a.current.trait {}
490
491 .search-results a:focus span {}
492 a.result-trait:focus {}
493 a.result-traitalias:focus {}
494 a.result-mod:focus,
495 a.result-externcrate:focus {}
496 a.result-mod:focus {}
497 a.result-externcrate:focus {}
498 a.result-enum:focus {}
499 a.result-struct:focus {}
500 a.result-union:focus {}
501 a.result-fn:focus,
502 a.result-method:focus,
503 a.result-tymethod:focus {}
504 a.result-type:focus {}
505 a.result-associatedtype:focus {}
506 a.result-foreigntype:focus {}
507 a.result-attr:focus,
508 a.result-derive:focus,
509 a.result-macro:focus {}
510 a.result-constant:focus,
511 a.result-static:focus {}
512 a.result-primitive:focus {}
513 a.result-keyword:focus {}
514
515 @media (max-width: 700px) {
516         .sidebar-menu {
517                 background-color: #14191f;
518                 border-bottom-color: #5c6773;
519                 border-right-color: #5c6773;
520         }
521
522         .sidebar-elems {
523                 background-color: #14191f;
524                 border-right-color: #5c6773;
525         }
526
527         #sidebar-filler {
528                 background-color: #14191f;
529                 border-bottom-color: #5c6773;
530         }
531 }
532
533 kbd {
534         color: #c5c5c5;
535         background-color: #314559;
536         border-color: #5c6773;
537         border-bottom-color: #5c6773;
538         box-shadow-color: #c6cbd1;
539 }
540
541 #theme-picker, #settings-menu, #help-button {
542         border-color: #5c6773;
543         background-color: #0f1419;
544         color: #fff;
545 }
546
547 #theme-picker > img, #settings-menu > img {
548         filter: invert(100);
549 }
550
551 #copy-path {
552         color: #fff;
553 }
554 #copy-path > img {
555         filter: invert(70%);
556 }
557 #copy-path:hover > img {
558         filter: invert(100%);
559 }
560
561 #theme-picker:hover, #theme-picker:focus,
562 #settings-menu:hover, #settings-menu:focus,
563 #help-button:hover, #help-button:focus {
564         border-color: #e0e0e0;
565 }
566
567 #theme-choices {
568         border-color: #5c6773;
569         background-color: #0f1419;
570 }
571
572 #theme-choices > button:not(:first-child) {
573         border-top-color: #5c6773;
574 }
575
576 #theme-choices > button:hover, #theme-choices > button:focus {
577         background-color: rgba(110, 110, 110, 0.33);
578 }
579
580 @media (max-width: 700px) {
581         #theme-picker {
582                 background: #0f1419;
583         }
584 }
585
586 #all-types {
587         background-color: #14191f;
588 }
589 #all-types:hover {
590         background-color: rgba(70, 70, 70, 0.33);
591 }
592
593 .search-results .result-name span.alias {
594         color: #c5c5c5;
595 }
596 .search-results .result-name span.grey {
597         color: #999;
598 }
599
600 #sidebar-toggle {
601         background-color: #14191f;
602 }
603 #sidebar-toggle:hover {
604         background-color: rgba(70, 70, 70, 0.33);
605 }
606 #source-sidebar {
607         background-color: #14191f;
608 }
609 #source-sidebar > .title {
610         color: #fff;
611         border-bottom-color: #5c6773;
612 }
613 div.files > a:hover, div.name:hover {
614         background-color: #14191f;
615         color: #ffb44c;
616 }
617 div.files > .selected {
618         background-color: #14191f;
619         color: #ffb44c;
620 }
621 .setting-line > .title {
622         border-bottom-color: #5c6773;
623 }
624 input:checked + .slider {
625         background-color: #ffb454 !important;
626 }
627
628 .scraped-example .example-wrap .rust span.highlight {
629         background: rgb(91, 59, 1);
630 }
631 .scraped-example .example-wrap .rust span.highlight.focus {
632         background: rgb(124, 75, 15);
633 }
634 .scraped-example:not(.expanded) .code-wrapper:before {
635         background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
636 }
637 .scraped-example:not(.expanded) .code-wrapper:after {
638         background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
639 }
640 .toggle-line-inner {
641         background: #616161;
642 }
643 .toggle-line:hover .toggle-line-inner {
644         background: ##898989;
645 }