]> git.proxmox.com Git - rustc.git/blob - src/librustdoc/html/static/rustdoc.css
New upstream version 1.17.0+dfsg1
[rustc.git] / src / librustdoc / html / static / rustdoc.css
1 /**
2 * Copyright 2013 The Rust Project Developers. See the COPYRIGHT
3 * file at the top-level directory of this distribution and at
4 * http://rust-lang.org/COPYRIGHT.
5 *
6 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 * option. This file may not be copied, modified, or distributed
10 * except according to those terms.
11 */
12
13 /* See FiraSans-LICENSE.txt for the Fira Sans license. */
14 @font-face {
15 font-family: 'Fira Sans';
16 font-style: normal;
17 font-weight: 400;
18 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
19 }
20 @font-face {
21 font-family: 'Fira Sans';
22 font-style: normal;
23 font-weight: 500;
24 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
25 }
26
27 /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license and
28 * Heuristica-LICENSE.txt for the Heuristica license. */
29 @font-face {
30 font-family: 'Source Serif Pro';
31 font-style: normal;
32 font-weight: 400;
33 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
34 }
35 @font-face {
36 font-family: 'Source Serif Pro';
37 font-style: italic;
38 font-weight: 400;
39 src: url("Heuristica-Italic.woff") format('woff');
40 }
41 @font-face {
42 font-family: 'Source Serif Pro';
43 font-style: normal;
44 font-weight: 700;
45 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
46 }
47
48 /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
49 @font-face {
50 font-family: 'Source Code Pro';
51 font-style: normal;
52 font-weight: 400;
53 /* Avoid using locally installed font because bad versions are in circulation:
54 * see https://github.com/rust-lang/rust/issues/24355 */
55 src: url("SourceCodePro-Regular.woff") format('woff');
56 }
57 @font-face {
58 font-family: 'Source Code Pro';
59 font-style: normal;
60 font-weight: 600;
61 src: url("SourceCodePro-Semibold.woff") format('woff');
62 }
63
64 * {
65 -webkit-box-sizing: border-box;
66 -moz-box-sizing: border-box;
67 box-sizing: border-box;
68 }
69
70 /* General structure and fonts */
71
72 body {
73 font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
74 margin: 0;
75 position: relative;
76 padding: 10px 15px 20px 15px;
77
78 -webkit-font-feature-settings: "kern", "liga";
79 -moz-font-feature-settings: "kern", "liga";
80 font-feature-settings: "kern", "liga";
81 }
82
83 h1 {
84 font-size: 1.5em;
85 }
86 h2 {
87 font-size: 1.4em;
88 }
89 h3 {
90 font-size: 1.3em;
91 }
92 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
93 font-weight: 500;
94 margin: 20px 0 15px 0;
95 padding-bottom: 6px;
96 }
97 h1.fqn {
98 border-bottom: 1px dashed;
99 margin-top: 0;
100 position: relative;
101 }
102 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
103 border-bottom: 1px solid;
104 }
105 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
106 font-weight: 600;
107 margin-top: 10px;
108 margin-bottom: 10px;
109 position: relative;
110 }
111 h3.impl, h3.method, h3.type {
112 margin-top: 15px;
113 }
114 h1, h2, h3, h4, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
115 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
116 }
117
118 ol, ul {
119 padding-left: 25px;
120 }
121 ul ul, ol ul, ul ol, ol ol {
122 margin-bottom: 0;
123 }
124
125 p {
126 margin: 0 0 .6em 0;
127 }
128
129 code, pre {
130 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
131 white-space: pre-wrap;
132 }
133 .docblock code, .docblock-short code {
134 border-radius: 3px;
135 padding: 0 0.2em;
136 }
137 .docblock pre code, .docblock-short pre code {
138 padding: 0;
139 }
140 pre {
141 padding: 14px;
142 }
143
144 .source .content pre {
145 padding: 20px;
146 }
147
148 img {
149 max-width: 100%;
150 }
151
152 .source .content {
153 margin-top: 50px;
154 max-width: none;
155 overflow: visible;
156 margin-left: 0px;
157 min-width: 70em;
158 }
159
160 nav.sub {
161 font-size: 16px;
162 text-transform: uppercase;
163 }
164
165 .sidebar {
166 width: 200px;
167 position: absolute;
168 left: 0;
169 top: 0;
170 min-height: 100vh;
171 }
172
173 .sidebar .current {
174 margin-right: -20px;
175 }
176
177 .content, nav { max-width: 960px; }
178
179 /* Everything else */
180
181 .js-only, .hidden { display: none !important; }
182
183 .sidebar {
184 padding: 10px;
185 }
186 .sidebar img {
187 margin: 20px auto;
188 display: block;
189 }
190
191 .sidebar .location {
192 border: 1px solid;
193 font-size: 17px;
194 margin: 30px 0 20px 0;
195 text-align: center;
196 }
197
198 .location:empty {
199 border: none;
200 }
201
202 .location a:first-child { font-weight: 500; }
203
204 .block {
205 padding: 0 10px;
206 margin-bottom: 14px;
207 }
208 .block h2, .block h3 {
209 margin-top: 0;
210 margin-bottom: 8px;
211 text-align: center;
212 }
213 .block ul, .block li {
214 margin: 0;
215 padding: 0;
216 list-style: none;
217 }
218
219 .block a {
220 display: block;
221 text-overflow: ellipsis;
222 overflow: hidden;
223 line-height: 15px;
224 padding: 7px 5px;
225 font-size: 14px;
226 font-weight: 300;
227 transition: border 500ms ease-out;
228 }
229
230 .content {
231 padding: 15px 0;
232 }
233
234 .source .content pre.rust {
235 white-space: pre;
236 overflow: auto;
237 padding-left: 0;
238 }
239 .content pre.line-numbers {
240 float: left;
241 border: none;
242 position: relative;
243
244 -webkit-user-select: none;
245 -moz-user-select: none;
246 -ms-user-select: none;
247 user-select: none;
248 }
249 .line-numbers span { cursor: pointer; }
250
251 .docblock-short p {
252 display: inline;
253 }
254
255 .docblock-short.nowrap {
256 display: block;
257 overflow: hidden;
258 white-space: nowrap;
259 text-overflow: ellipsis;
260 }
261
262 .docblock-short p {
263 overflow: hidden;
264 text-overflow: ellipsis;
265 margin: 0;
266 }
267 .docblock-short code { white-space: nowrap; }
268
269 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
270 border-bottom: 1px solid;
271 }
272
273 .docblock h1 { font-size: 1.3em; }
274 .docblock h2 { font-size: 1.15em; }
275 .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
276
277 .docblock {
278 margin-left: 24px;
279 }
280
281 .content .out-of-band {
282 font-size: 23px;
283 margin: 0px;
284 padding: 0px;
285 text-align: right;
286 display: inline-block;
287 font-weight: normal;
288 position: absolute;
289 right: 0;
290 }
291
292 h3.impl > .out-of-band {
293 font-size: 21px;
294 }
295
296 h4 > code, h3 > code, .invisible > code {
297 position: inherit;
298 }
299
300 .in-band, code {
301 z-index: 5;
302 }
303
304 .invisible {
305 background: rgba(0, 0, 0, 0);
306 width: 100%;
307 display: inline-block;
308 }
309
310 .content .in-band {
311 margin: 0px;
312 padding: 0px;
313 display: inline-block;
314 }
315
316 #main { position: relative; }
317 #main > .since {
318 top: inherit;
319 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
320 }
321
322 .content table {
323 border-spacing: 0 5px;
324 border-collapse: separate;
325 }
326 .content td { vertical-align: top; }
327 .content td:first-child { padding-right: 20px; }
328 .content td p:first-child { margin-top: 0; }
329 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
330
331 .docblock table {
332 border: 1px solid;
333 margin: .5em 0;
334 border-collapse: collapse;
335 width: 100%;
336 }
337
338 .docblock table td {
339 padding: .5em;
340 border-top: 1px dashed;
341 border-bottom: 1px dashed;
342 }
343
344 .docblock table th {
345 padding: .5em;
346 text-align: left;
347 border-top: 1px solid;
348 border-bottom: 1px solid;
349 }
350
351 .fields + table {
352 margin-bottom: 1em;
353 }
354
355 .content .item-list {
356 list-style-type: none;
357 padding: 0;
358 }
359
360 .content .item-list li { margin-bottom: 3px; }
361
362 .content .multi-column {
363 -moz-column-count: 5;
364 -moz-column-gap: 2.5em;
365 -webkit-column-count: 5;
366 -webkit-column-gap: 2.5em;
367 column-count: 5;
368 column-gap: 2.5em;
369 }
370 .content .multi-column li { width: 100%; display: inline-block; }
371
372 .content .method {
373 font-size: 1em;
374 position: relative;
375 }
376 /* Shift "where ..." part of method or fn definition down a line */
377 .content .method .where,
378 .content .fn .where,
379 .content .where.fmt-newline {
380 display: block;
381 }
382 /* Bit of whitespace to indent it */
383 .content .method .where::before,
384 .content .fn .where::before,
385 .content .where.fmt-newline::before {
386 content: ' ';
387 }
388
389 .content .methods > div { margin-left: 40px; }
390
391 .content .impl-items .docblock, .content .impl-items .stability {
392 margin-left: 40px;
393 }
394 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
395 margin-left: 20px;
396 }
397
398 .content .stability code {
399 font-size: 90%;
400 }
401
402 /* Shift where in trait listing down a line */
403 pre.trait .where::before {
404 content: '\a ';
405 }
406
407 nav {
408 border-bottom: 1px solid;
409 padding-bottom: 10px;
410 margin-bottom: 10px;
411 }
412 nav.main {
413 padding: 20px 0;
414 text-align: center;
415 }
416 nav.main .current {
417 border-top: 1px solid;
418 border-bottom: 1px solid;
419 }
420 nav.main .separator {
421 border: 1px solid;
422 display: inline-block;
423 height: 23px;
424 margin: 0 20px;
425 }
426 nav.sum { text-align: right; }
427 nav.sub form { display: inline; }
428
429 nav.sub, .content {
430 margin-left: 230px;
431 }
432
433 a {
434 text-decoration: none;
435 background: transparent;
436 }
437
438 .docblock a:hover, .docblock-short a:hover, .stability a {
439 text-decoration: underline;
440 }
441
442 .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
443 .content span.struct, .content a.struct, .block a.current.struct { color: #df3600; }
444 .content span.type, .content a.type, .block a.current.type { color: #e57300; }
445 .content span.macro, .content a.macro, .block a.current.macro { color: #068000; }
446 .block a.current.crate { font-weight: 500; }
447
448 .search-input {
449 width: 100%;
450 /* Override Normalize.css: we have margins and do
451 not want to overflow - the `moz` attribute is necessary
452 until Firefox 29, too early to drop at this point */
453 -moz-box-sizing: border-box !important;
454 box-sizing: border-box !important;
455 outline: none;
456 border: none;
457 border-radius: 1px;
458 margin-top: 5px;
459 padding: 10px 16px;
460 font-size: 17px;
461 transition: border-color 300ms ease;
462 transition: border-radius 300ms ease-in-out;
463 transition: box-shadow 300ms ease-in-out;
464 }
465
466 .search-input:focus {
467 border-color: #66afe9;
468 border-radius: 2px;
469 border: 0;
470 outline: 0;
471 box-shadow: 0 0 8px #078dd8;
472 }
473
474 .search-results .desc {
475 white-space: nowrap;
476 text-overflow: ellipsis;
477 overflow: hidden;
478 display: block;
479 }
480
481 .search-results a {
482 display: block;
483 }
484
485 .content .search-results td:first-child { padding-right: 0; }
486 .content .search-results td:first-child a { padding-right: 10px; }
487
488 tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black;
489 }
490
491 body.blur > :not(#help) {
492 filter: blur(8px);
493 -webkit-filter: blur(8px);
494 opacity: .7;
495 }
496
497 #help {
498 width: 100%;
499 height: 100vh;
500 position: fixed;
501 top: 0;
502 left: 0;
503 display: flex;
504 justify-content: center;
505 align-items: center;
506 }
507 #help > div {
508 flex: 0 0 auto;
509 box-shadow: 0 0 6px rgba(0,0,0,.2);
510 width: 550px;
511 height: 330px;
512 border: 1px solid;
513 }
514 #help dt {
515 float: left;
516 border-radius: 4px;
517 border: 1px solid;
518 width: 23px;
519 text-align: center;
520 clear: left;
521 display: block;
522 margin-top: -1px;
523 }
524 #help dd { margin: 5px 33px; }
525 #help .infos { padding-left: 0; }
526 #help h1, #help h2 { margin-top: 0; }
527 #help > div div {
528 width: 50%;
529 float: left;
530 padding: 20px;
531 }
532
533 .stab {
534 display: table;
535 border-width: 1px;
536 border-style: solid;
537 padding: 3px;
538 margin-bottom: 5px;
539 font-size: 90%;
540 }
541 .stab p {
542 display: inline;
543 }
544
545 .stab summary {
546 display: list-item;
547 }
548
549 .stab .microscope {
550 font-size: 1.5em;
551 }
552
553 .module-item .stab {
554 display: inline;
555 border-width: 0;
556 padding: 0;
557 margin: 0;
558 background: inherit !important;
559 }
560
561 .module-item.unstable {
562 opacity: 0.65;
563 }
564
565 .since {
566 font-weight: normal;
567 font-size: initial;
568 position: absolute;
569 right: 0;
570 top: 0;
571 }
572
573 .variants_table {
574 width: 100%;
575 }
576
577 .variants_table tbody tr td:first-child {
578 width: 1%; /* make the variant name as small as possible */
579 }
580
581 td.summary-column {
582 width: 100%;
583 }
584
585 .summary {
586 padding-right: 0px;
587 }
588
589 pre.rust .question-mark {
590 font-weight: bold;
591 }
592
593 pre.rust { position: relative; }
594 a.test-arrow {
595 display: inline-block;
596 position: absolute;
597 padding: 5px 10px 5px 10px;
598 border-radius: 5px;
599 font-size: 130%;
600 top: 5px;
601 right: 5px;
602 }
603 a.test-arrow:hover{
604 text-decoration: none;
605 }
606
607 .section-header:hover a:after {
608 content: '\2002\00a7\2002';
609 }
610
611 .section-header:hover a {
612 text-decoration: none;
613 }
614
615 .section-header a {
616 color: inherit;
617 }
618
619 .collapse-toggle {
620 font-weight: 300;
621 position: absolute;
622 left: -23px;
623 color: #999;
624 top: 0;
625 }
626
627 .toggle-wrapper > .collapse-toggle {
628 left: -24px;
629 margin-top: 0px;
630 }
631
632 .toggle-wrapper {
633 position: relative;
634 }
635
636 .toggle-wrapper.collapsed {
637 height: 1em;
638 transition: height .2s;
639 }
640
641 .collapse-toggle > .inner {
642 display: inline-block;
643 width: 1.2ch;
644 text-align: center;
645 }
646
647 .ghost {
648 display: none;
649 }
650
651 .ghost + .since {
652 position: initial;
653 display: table-cell;
654 }
655
656 .since + .srclink {
657 display: table-cell;
658 padding-left: 10px;
659 }
660
661 span.since {
662 position: initial;
663 font-size: 20px;
664 margin-right: 5px;
665 }
666
667 .toggle-wrapper > .collapse-toggle {
668 left: 0;
669 }
670
671 .variant + .toggle-wrapper > a {
672 margin-top: 5px;
673 }
674
675 .sub-variant, .sub-variant > h3 {
676 margin-top: 0 !important;
677 }
678
679 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
680 margin-left: 30px;
681 margin-bottom: 20px;
682 margin-top: 5px;
683 }
684
685 .enum > .collapsed, .struct > .collapsed {
686 margin-bottom: 25px;
687 }
688
689 .enum .variant, .struct .structfield {
690 display: block;
691 }
692
693 .attributes {
694 display: block;
695 margin: 0px 0px 0px 30px !important;
696 }
697 .toggle-attributes.collapsed {
698 margin-bottom: 5px;
699 }
700
701 :target > code {
702 opacity: 1;
703 }
704
705 /* Media Queries */
706
707 @media (max-width: 700px) {
708 body {
709 padding-top: 0px;
710 }
711
712 .sidebar {
713 height: 40px;
714 min-height: 40px;
715 width: 100%;
716 margin: 0px;
717 padding: 0px;
718 position: static;
719 }
720
721 .sidebar .location {
722 float: right;
723 margin: 0px;
724 padding: 3px 10px 1px 10px;
725 min-height: 39px;
726 background: inherit;
727 text-align: left;
728 font-size: 24px;
729 }
730
731 .sidebar .location:empty {
732 padding: 0;
733 }
734
735 .sidebar img {
736 width: 35px;
737 margin-top: 5px;
738 margin-bottom: 0px;
739 float: left;
740 }
741
742 nav.sub {
743 margin: 0 auto;
744 }
745
746 .sidebar .block {
747 display: none;
748 }
749
750 .content {
751 margin-left: 0px;
752 }
753
754 .content .in-band {
755 width: 100%;
756 }
757
758 .content .out-of-band {
759 display: none;
760 }
761
762 .toggle-wrapper > .collapse-toggle {
763 left: 0px;
764 }
765
766 .toggle-wrapper {
767 height: 1.5em;
768 }
769 }
770
771 @media print {
772 nav.sub, .content .out-of-band, .collapse-toggle {
773 display: none;
774 }
775 }