]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/css/themes/ayu.css
Rollup merge of #100984 - ChrisDenton:reinstate-init, r=Mark-Simulacrum
[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 :root {
7         --main-background-color: #0f1419;
8         --main-color: #c5c5c5;
9         --settings-input-color: #ffb454;
10         --sidebar-background-color: #14191f;
11         --sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
12         --code-block-background-color: #191f26;
13         --scrollbar-track-background-color: transparent;
14         --scrollbar-thumb-background-color: #5c6773;
15         --scrollbar-color: #5c6773 #24292f;
16         --headings-border-bottom-color: #5c6773;
17         --border-color: #5c6773;
18         --button-background-color: #141920;
19 }
20
21 .slider {
22         background-color: #ccc;
23 }
24 .slider:before {
25         background-color: white;
26 }
27 input:focus + .slider {
28         box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
29 }
30
31 h1, h2, h3, h4 {
32         color: white;
33 }
34 h1.fqn  a {
35         color: #fff;
36 }
37 h4 {
38         border: none;
39 }
40
41 .docblock code {
42         color: #ffb454;
43 }
44 .code-header {
45         color: #e6e1cf;
46 }
47 .docblock pre > code, pre > code {
48         color: #e6e1cf;
49 }
50 .item-info code {
51         color: #e6e1cf;
52 }
53 .docblock a > code {
54         color: #39AFD7 !important;
55 }
56 pre, .rustdoc.source .example-wrap {
57         color: #e6e1cf;
58 }
59
60 .rust-logo {
61         filter: drop-shadow(1px 0 0px #fff)
62                 drop-shadow(0 1px 0 #fff)
63                 drop-shadow(-1px 0 0 #fff)
64                 drop-shadow(0 -1px 0 #fff);
65 }
66
67 .sidebar .current,
68 .sidebar a:hover {
69         background-color: transparent;
70         color: #ffb44c;
71 }
72
73 .sidebar-elems .location {
74         color: #ff7733;
75 }
76
77 .line-numbers span { color: #5c6773; }
78 .line-numbers .line-highlighted {
79         color: #708090;
80         background-color: rgba(255, 236, 164, 0.06);
81         padding-right: 4px;
82         border-right: 1px solid #ffb44c;
83 }
84
85 .search-results a:hover {
86         color: #fff !important;
87         background-color: #3c3c3c;
88 }
89
90 .search-results a:focus {
91         color: #fff !important;
92         background-color: #3c3c3c;
93 }
94 .search-results a {
95         color: #0096cf;
96 }
97 .search-results a div.desc {
98         color: #c5c5c5;
99 }
100
101 .content .item-info::before { color: #ccc; }
102
103 .content span.foreigntype, .content a.foreigntype { color: #ffa0a5; }
104 .content span.union, .content a.union { color: #ffa0a5; }
105 .content span.constant, .content a.constant,
106 .content span.static, .content a.static { color: #39AFD7; }
107 .content span.primitive, .content a.primitive { color: #ffa0a5; }
108 .content span.traitalias, .content a.traitalias { color: #39AFD7; }
109 .content span.keyword, .content a.keyword { color: #39AFD7; }
110
111 .content span.externcrate, .content span.mod, .content a.mod {
112         color: #39AFD7;
113 }
114 .content span.struct, .content a.struct {
115         color: #ffa0a5;
116 }
117 .content span.enum, .content a.enum {
118         color: #ffa0a5;
119 }
120 .content span.trait, .content a.trait {
121         color: #39AFD7;
122 }
123 .content span.type, .content a.type {
124         color: #39AFD7;
125 }
126 .content span.type,
127 .content a.type,
128 .block a.current.type { color: #39AFD7; }
129 .content span.associatedtype,
130 .content a.associatedtype,
131 .block a.current.associatedtype { color: #39AFD7; }
132 .content span.fn, .content a.fn, .content span.method,
133 .content a.method, .content span.tymethod,
134 .content a.tymethod, .content .fnname {
135         color: #fdd687;
136 }
137 .content span.attr, .content a.attr, .content span.derive,
138 .content a.derive, .content span.macro, .content a.macro {
139         color: #a37acc;
140 }
141
142 .sidebar a { color: #53b1db; }
143 .sidebar a.current.type { color: #53b1db; }
144 .sidebar a.current.associatedtype { color: #53b1db; }
145
146 pre.rust .comment { color: #788797; }
147 pre.rust .doccomment { color: #a1ac88; }
148
149 a {
150         color: #39AFD7;
151 }
152
153 .sidebar h2 a,
154 .sidebar h3 a {
155         color: white;
156 }
157 body.source .example-wrap pre.rust a {
158         background: #333;
159 }
160
161 details.rustdoc-toggle > summary.hideme > span,
162 details.rustdoc-toggle > summary::before {
163         color: #999;
164 }
165
166 details.rustdoc-toggle > summary::before {
167         filter: invert(100%);
168 }
169
170 #crate-search-div::after {
171         /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
172         filter: invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);
173 }
174 #crate-search:hover, #crate-search:focus {
175         border-color: #e0e0e0 !important;
176 }
177 #crate-search-div:hover::after, #crate-search-div:focus-within::after {
178         filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);
179 }
180
181 .search-input {
182         color: #fff;
183 }
184
185 .module-item .stab,
186 .import-item .stab {
187         color: #000;
188 }
189
190 .stab {
191         color: #c5c5c5;
192         background: #314559 !important;
193 }
194
195 .stab.portability > code {
196         color: #e6e1cf;
197         background: none;
198 }
199
200 .rightside:not(a),
201 .out-of-band {
202         color: grey;
203 }
204
205 .result-name .primitive > i, .result-name .keyword > i {
206         color: #788797;
207 }
208
209 .line-numbers :target { background-color: transparent; }
210
211 /* Code highlighting */
212 pre.rust .number, pre.rust .string { color: #b8cc52; }
213 pre.rust .kw, pre.rust .kw-2, pre.rust .prelude-ty,
214 pre.rust .bool-val, pre.rust .prelude-val,
215 pre.rust .lifetime { color: #ff7733; }
216 pre.rust .macro, pre.rust .macro-nonterminal { color: #a37acc; }
217 pre.rust .question-mark {
218         color: #ff9011;
219 }
220 pre.rust .self {
221         color: #36a3d9;
222         font-style: italic;
223 }
224 pre.rust .attribute {
225         color: #e6e1cf;
226 }
227
228 .example-wrap > pre.line-number {
229         color: #5c67736e;
230         border: none;
231 }
232
233 a.test-arrow {
234         font-size: 100%;
235         color: #788797;
236         border-radius: 4px;
237         background-color: rgba(57, 175, 215, 0.09);
238 }
239
240 a.test-arrow:hover {
241         background-color: rgba(57, 175, 215, 0.368);
242         color: #c5c5c5;
243 }
244
245 .toggle-label,
246 .code-attribute {
247         color: #999;
248 }
249
250 :target {
251         background: rgba(255, 236, 164, 0.06);
252         border-right: 3px solid rgba(255, 180, 76, 0.85);
253 }
254
255 pre.compile_fail {
256         border-left: 2px solid rgba(255,0,0,.4);
257 }
258
259 pre.compile_fail:hover, .information:hover + pre.compile_fail {
260         border-left: 2px solid #f00;
261 }
262
263 pre.should_panic {
264         border-left: 2px solid rgba(255,0,0,.4);
265 }
266
267 pre.should_panic:hover, .information:hover + pre.should_panic {
268         border-left: 2px solid #f00;
269 }
270
271 pre.ignore {
272         border-left: 2px solid rgba(255,142,0,.6);
273 }
274
275 pre.ignore:hover, .information:hover + pre.ignore {
276         border-left: 2px solid #ff9200;
277 }
278
279 .tooltip.compile_fail {
280         color: rgba(255,0,0,.5);
281 }
282
283 .information > .compile_fail:hover {
284         color: #f00;
285 }
286
287 .tooltip.should_panic {
288         color: rgba(255,0,0,.5);
289 }
290
291 .information > .should_panic:hover {
292         color: #f00;
293 }
294
295 .tooltip.ignore {
296         color: rgba(255,142,0,.6);
297 }
298
299 .information > .ignore:hover {
300         color: #ff9200;
301 }
302
303 .search-failed a {
304         color: #39AFD7;
305 }
306
307 .tooltip::after {
308         background-color: #314559;
309         color: #c5c5c5;
310 }
311
312 .tooltip::before {
313         border-color: transparent #314559 transparent transparent;
314 }
315
316 .notable-traits-tooltiptext {
317         background-color: #314559;
318 }
319
320 #titles > button.selected {
321         background-color: #141920 !important;
322         border-bottom: 1px solid #ffb44c !important;
323         border-top: none;
324 }
325
326 #titles > button:not(.selected) {
327         background-color: transparent !important;
328         border: none;
329 }
330
331 #titles > button:hover {
332         border-bottom: 1px solid rgba(242, 151, 24, 0.3);
333 }
334
335 #titles > button > div.count {
336         color: #888;
337 }
338
339 /* rules that this theme does not need to set, here to satisfy the rule checker */
340 /* note that a lot of these are partially set in some way (meaning they are set
341 individually rather than as a group) */
342 /* FIXME: these rules should be at the bottom of the file but currently must be
343 above the `@media (max-width: 700px)` rules due to a bug in the css checker */
344 /* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
345 .search-input:focus {}
346 .content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,
347 .block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
348 .content span.struct,.content a.struct,.block a.current.struct {}
349 #titles>button:hover,#titles>button.selected {}
350 .content span.typedef,.content a.typedef,.block a.current.typedef {}
351 .content span.union,.content a.union,.block a.current.union {}
352 pre.rust .lifetime {}
353 .stab.unstable {}
354 h2,
355 h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {}
356 .content span.enum,.content a.enum,.block a.current.enum {}
357 .content span.constant,.content a.constant,.block a.current.constant,.content span.static,
358 .content a.static, .block a.current.static {}
359 .content span.keyword,.content a.keyword,.block a.current.keyword {}
360 .content span.traitalias,.content a.traitalias,.block a.current.traitalias {}
361 .content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,
362 .block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,
363 .content .fnname {}
364 pre.rust .kw {}
365 pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute {}
366 .content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {}
367 .stab.deprecated {}
368 .content a.attr,.content a.derive,.content a.macro {}
369 .stab.portability {}
370 .content span.primitive,.content a.primitive,.block a.current.primitive {}
371 .content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod {}
372 pre.rust .kw-2,pre.rust .prelude-ty {}
373 .content span.trait,.content a.trait,.block a.current.trait {}
374
375 .search-results a:focus span {}
376 a.result-trait:focus {}
377 a.result-traitalias:focus {}
378 a.result-mod:focus,
379 a.result-externcrate:focus {}
380 a.result-mod:focus {}
381 a.result-externcrate:focus {}
382 a.result-enum:focus {}
383 a.result-struct:focus {}
384 a.result-union:focus {}
385 a.result-fn:focus,
386 a.result-method:focus,
387 a.result-tymethod:focus {}
388 a.result-type:focus {}
389 a.result-associatedtype:focus {}
390 a.result-foreigntype:focus {}
391 a.result-attr:focus,
392 a.result-derive:focus,
393 a.result-macro:focus {}
394 a.result-constant:focus,
395 a.result-static:focus {}
396 a.result-primitive:focus {}
397 a.result-keyword:focus {}
398
399 .sidebar a.current.enum {}
400 .sidebar a.current.struct {}
401 .sidebar a.current.foreigntype {}
402 .sidebar a.current.attr,
403 .sidebar a.current.derive,
404 .sidebar a.current.macro {}
405 .sidebar a.current.union {}
406 .sidebar a.current.constant
407 .sidebar a.current.static {}
408 .sidebar a.current.primitive {}
409 .sidebar a.current.externcrate
410 .sidebar a.current.mod {}
411 .sidebar a.current.trait {}
412 .sidebar a.current.traitalias {}
413 .sidebar a.current.fn,
414 .sidebar a.current.method,
415 .sidebar a.current.tymethod {}
416 .sidebar a.current.keyword {}
417
418 kbd {
419         color: #c5c5c5;
420         background-color: #314559;
421         box-shadow: inset 0 -1px 0 #5c6773;
422 }
423
424 #settings-menu > a, #help-button > button {
425         color: #fff;
426 }
427
428 #settings-menu > a img {
429         filter: invert(100);
430 }
431
432 #copy-path {
433         color: #fff;
434 }
435 #copy-path > img {
436         filter: invert(70%);
437 }
438 #copy-path:hover > img {
439         filter: invert(100%);
440 }
441
442 #settings-menu > a:hover, #settings-menu > a:focus,
443 #help-button > button:hover, #help-button > button:focus {
444         border-color: #e0e0e0;
445 }
446
447 .search-results .result-name span.alias {
448         color: #c5c5c5;
449 }
450 .search-results .result-name span.grey {
451         color: #999;
452 }
453
454 #source-sidebar > .title {
455         color: #fff;
456 }
457 #source-sidebar div.files > a:hover, details.dir-entry summary:hover,
458 #source-sidebar div.files > a:focus, details.dir-entry summary:focus {
459         background-color: #14191f;
460         color: #ffb44c;
461 }
462 #source-sidebar div.files > a.selected {
463         background-color: #14191f;
464         color: #ffb44c;
465 }
466
467 .scraped-example-list .scrape-help {
468         border-color: #aaa;
469         color: #eee;
470 }
471 .scraped-example-list .scrape-help:hover {
472         border-color: white;
473         color: white;
474 }
475 .more-examples-toggle summary, .more-examples-toggle .hide-more {
476         color: #999;
477 }
478 .scraped-example .example-wrap .rust span.highlight {
479         background: rgb(91, 59, 1);
480 }
481 .scraped-example .example-wrap .rust span.highlight.focus {
482         background: rgb(124, 75, 15);
483 }
484 .scraped-example:not(.expanded) .code-wrapper:before {
485         background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
486 }
487 .scraped-example:not(.expanded) .code-wrapper:after {
488         background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
489 }
490 .toggle-line-inner {
491         background: #999;
492 }
493 .toggle-line:hover .toggle-line-inner {
494         background: #c5c5c5;
495 }