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