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