]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/rustdoc.css
Auto merge of #53830 - davidtwco:issue-53228, r=nikomatsakis
[rust.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):not(.important), 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         overflow: auto;
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         padding-left: 15px;
113 }
114
115 h1, h2, h3, h4,
116 .sidebar, a.source, .search-input, .content table :not(code)>a,
117 .collapse-toggle, ul.item-list > li > .out-of-band {
118         font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
119 }
120
121 ol, ul {
122         padding-left: 25px;
123 }
124 ul ul, ol ul, ul ol, ol ol {
125         margin-bottom: 0;
126 }
127
128 p {
129         margin: 0 0 .6em 0;
130 }
131
132 summary {
133         outline: none;
134 }
135
136 code, pre {
137         font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
138         white-space: pre-wrap;
139 }
140 .docblock code, .docblock-short code {
141         border-radius: 3px;
142         padding: 0 0.2em;
143 }
144 .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
145         padding: 0;
146 }
147 .docblock code.spotlight :last-child {
148         padding-bottom: 0.6em;
149 }
150 pre {
151         padding: 14px;
152 }
153
154 .source .content pre {
155         padding: 20px;
156 }
157
158 img {
159         max-width: 100%;
160 }
161
162 .source .content {
163         margin-top: 50px;
164         max-width: none;
165         overflow: visible;
166         margin-left: 0px;
167         min-width: 70em;
168 }
169
170 nav.sub {
171         font-size: 16px;
172         text-transform: uppercase;
173 }
174
175 .sidebar {
176         width: 200px;
177         position: fixed;
178         left: 0;
179         top: 0;
180         height: 100vh;
181         overflow: auto;
182 }
183
184 .sidebar .block > ul > li {
185         margin-right: -10px;
186 }
187
188 .content, nav {
189         max-width: 960px;
190 }
191
192 /* Everything else */
193
194 .js-only, .hidden {
195         display: none !important;
196 }
197
198 .sidebar img {
199         margin: 20px auto;
200         display: block;
201         margin-top: 10px;
202 }
203
204 .sidebar .location {
205         border: 1px solid;
206         font-size: 17px;
207         margin: 30px 10px 20px 10px;
208         text-align: center;
209         word-wrap: break-word;
210 }
211
212 .sidebar .version {
213         font-size: 15px;
214         text-align: center;
215         border-bottom: 1px solid;
216         overflow-wrap: break-word;
217         word-wrap: break-word; /* deprecated */
218         word-break: break-word; /* Chrome, non-standard */
219 }
220
221 .location:empty {
222         border: none;
223 }
224
225 .location a:first-child {
226         font-weight: 500;
227 }
228
229 .block {
230         padding: 0;
231         margin-bottom: 14px;
232 }
233 .block h2, .block h3 {
234         margin-top: 0;
235         margin-bottom: 8px;
236         text-align: center;
237 }
238 .block ul, .block li {
239         margin: 0 10px;
240         padding: 0;
241         list-style: none;
242 }
243
244 .block a {
245         display: block;
246         text-overflow: ellipsis;
247         overflow: hidden;
248         line-height: 15px;
249         padding: 7px 5px;
250         font-size: 14px;
251         font-weight: 300;
252         transition: border 500ms ease-out;
253 }
254
255 .sidebar-title {
256         border-top: 1px solid;
257         border-bottom: 1px solid;
258         text-align: center;
259         font-size: 17px;
260         margin-bottom: 5px;
261 }
262
263 .sidebar-links {
264         margin-bottom: 15px;
265 }
266
267 .sidebar-links > a {
268         padding-left: 10px;
269         width: 100%;
270 }
271
272 .sidebar-menu {
273         display: none;
274 }
275
276 .content {
277         padding: 15px 0;
278 }
279
280 .source .content pre.rust {
281         white-space: pre;
282         overflow: auto;
283         padding-left: 0;
284 }
285
286 #search {
287         margin-left: 230px;
288         position: relative;
289 }
290
291 #results {
292         position: absolute;
293         right: 0;
294         left: 0;
295         overflow: auto;
296 }
297
298 #results > table {
299         width: 100%;
300         table-layout: fixed;
301 }
302
303 .content pre.line-numbers {
304         float: left;
305         border: none;
306         position: relative;
307
308         -webkit-user-select: none;
309         -moz-user-select: none;
310         -ms-user-select: none;
311         user-select: none;
312 }
313 .line-numbers span {
314         cursor: pointer;
315 }
316
317 .docblock-short p {
318         display: inline;
319 }
320
321 .docblock-short.nowrap {
322         display: block;
323         overflow: hidden;
324         white-space: nowrap;
325         text-overflow: ellipsis;
326 }
327
328 .docblock-short p {
329         overflow: hidden;
330         text-overflow: ellipsis;
331         margin: 0;
332 }
333 .docblock-short code {
334         white-space: nowrap;
335 }
336
337 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
338         border-bottom: 1px solid;
339 }
340
341 #main > .docblock h1 { font-size: 1.3em; }
342 #main > .docblock h2 { font-size: 1.15em; }
343 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
344
345 .docblock h1 { font-size: 1em; }
346 .docblock h2 { font-size: 0.95em; }
347 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
348
349 .docblock {
350         margin-left: 24px;
351         position: relative;
352 }
353
354 .content .out-of-band {
355         float: right;
356         font-size: 23px;
357         margin: 0px;
358         padding: 0px;
359         font-weight: normal;
360 }
361
362 h3.impl > .out-of-band {
363         font-size: 21px;
364 }
365
366 h4.method > .out-of-band {
367         font-size: 19px;
368 }
369
370 ul.item-list > li > .out-of-band {
371         font-size: 19px;
372 }
373
374 h4 > code, h3 > code, .invisible > code {
375         max-width: calc(100% - 41px);
376         display: block;
377 }
378
379 .in-band, code {
380         z-index: 5;
381 }
382
383 .invisible {
384         width: 100%;
385         display: inline-block;
386 }
387
388 .content .in-band {
389         margin: 0px;
390         padding: 0px;
391 }
392
393 .in-band > code {
394         display: inline-block;
395 }
396
397 #main {
398         position: relative;
399 }
400 #main > .since {
401         top: inherit;
402         font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
403 }
404
405 .content table:not(.table-display) {
406         border-spacing: 0 5px;
407 }
408 .content td { vertical-align: top; }
409 .content td:first-child { padding-right: 20px; }
410 .content td p:first-child { margin-top: 0; }
411 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
412 .content tr:first-child td { border-top: 0; }
413
414 .docblock table {
415         margin: .5em 0;
416         width: 100%;
417 }
418
419 .docblock table td {
420         padding: .5em;
421         border: 1px dashed;
422 }
423
424 .docblock table th {
425         padding: .5em;
426         text-align: left;
427         border: 1px solid;
428 }
429
430 .fields + table {
431         margin-bottom: 1em;
432 }
433
434 .content .item-list {
435         list-style-type: none;
436         padding: 0;
437 }
438
439 .content .item-list li {
440         margin-bottom: 1em;
441 }
442
443 .content .multi-column {
444         -moz-column-count: 5;
445         -moz-column-gap: 2.5em;
446         -webkit-column-count: 5;
447         -webkit-column-gap: 2.5em;
448         column-count: 5;
449         column-gap: 2.5em;
450 }
451 .content .multi-column li { width: 100%; display: inline-block; }
452
453 .content .method {
454         font-size: 1em;
455         position: relative;
456 }
457 /* Shift "where ..." part of method or fn definition down a line */
458 .content .method .where,
459 .content .fn .where,
460 .content .where.fmt-newline {
461         display: block;
462         font-size: 0.8em;
463 }
464
465 .content .methods > div:not(.important-traits) {
466         margin-left: 40px;
467         margin-bottom: 15px;
468 }
469
470 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
471         margin-left: 20px;
472 }
473 .content .impl-items .docblock, .content .impl-items .stability {
474         margin-bottom: .6em;
475 }
476 .content .docblock > .impl-items {
477         margin-left: 20px;
478         margin-top: -34px;
479 }
480 .content .docblock > .impl-items > h4 {
481         border-bottom: 0;
482 }
483 .content .docblock >.impl-items .table-display {
484         margin: 0;
485 }
486 .content .docblock >.impl-items table td {
487         padding: 0;
488 }
489 .toggle-wrapper.marg-left > .collapse-toggle {
490         left: -24px;
491 }
492 .content .docblock > .impl-items .table-display, .impl-items table td {
493         border: none;
494 }
495
496 .content .stability code {
497         font-size: 90%;
498 }
499
500 .content .stability {
501         position: relative;
502         margin-left: 33px;
503         margin-top: -13px;
504 }
505
506 .content .stability::before {
507         content: '˪';
508         font-size: 30px;
509         position: absolute;
510         top: -9px;
511         left: -13px;
512 }
513 .methods > .stability {
514         margin-top: -8px;
515 }
516
517 #main > .stability {
518         margin-top: 0;
519 }
520
521 nav {
522         border-bottom: 1px solid;
523         padding-bottom: 10px;
524         margin-bottom: 10px;
525 }
526 nav.main {
527         padding: 20px 0;
528         text-align: center;
529 }
530 nav.main .current {
531         border-top: 1px solid;
532         border-bottom: 1px solid;
533 }
534 nav.main .separator {
535         border: 1px solid;
536         display: inline-block;
537         height: 23px;
538         margin: 0 20px;
539 }
540 nav.sum { text-align: right; }
541 nav.sub form { display: inline; }
542
543 nav.sub, .content {
544         margin-left: 230px;
545 }
546
547 a {
548         text-decoration: none;
549         background: transparent;
550 }
551
552 .small-section-header:hover > .anchor {
553         display: initial;
554 }
555
556 .in-band:hover > .anchor {
557         display: inline-block;
558         position: absolute;
559 }
560 .anchor {
561         display: none;
562         position: absolute;
563         left: -7px;
564 }
565 .anchor.field {
566         left: -5px;
567 }
568 .small-section-header > .anchor {
569         left: -28px;
570         padding-right: 10px; /* avoid gap that causes hover to disappear */
571 }
572 .anchor:before {
573         content: '\2002\00a7\2002';
574 }
575
576 .docblock a:not(.srclink):not(.test-arrow):hover,
577 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
578         text-decoration: underline;
579 }
580
581 .block a.current.crate { font-weight: 500; }
582
583 .search-container {
584         position: relative;
585 }
586 .search-container > .top-button {
587         position: absolute;
588         right: 0;
589         top: 10px;
590 }
591 .search-input {
592         width: calc(100% - 34px);
593         /* Override Normalize.css: we have margins and do
594          not want to overflow - the `moz` attribute is necessary
595          until Firefox 29, too early to drop at this point */
596         -moz-box-sizing: border-box !important;
597         box-sizing: border-box !important;
598         outline: none;
599         border: none;
600         border-radius: 1px;
601         margin-top: 5px;
602         padding: 10px 16px;
603         font-size: 17px;
604         transition: border-color 300ms ease;
605         transition: border-radius 300ms ease-in-out;
606         transition: box-shadow 300ms ease-in-out;
607 }
608
609 .search-input:focus {
610         border-radius: 2px;
611         border: 0;
612         outline: 0;
613         box-shadow: 0 0 8px #078dd8;
614 }
615
616 .search-results .desc {
617         white-space: nowrap;
618         text-overflow: ellipsis;
619         overflow: hidden;
620         display: block;
621 }
622
623 .search-results a {
624         display: block;
625 }
626
627 .content .search-results td:first-child {
628         padding-right: 0;
629         width: 50%;
630 }
631 .content .search-results td:first-child a {
632         padding-right: 10px;
633 }
634 .content .search-results td:first-child a:after {
635     clear: both;
636     content: "";
637     display: block;
638 }
639 .content .search-results td:first-child a span {
640         float: left;
641 }
642
643 tr.result span.primitive::after {
644         content: ' (primitive type)';
645         font-style: italic;
646 }
647
648 tr.result span.keyword::after {
649         content: ' (keyword)';
650         font-style: italic;
651 }
652
653 body.blur > :not(#help) {
654         filter: blur(8px);
655         -webkit-filter: blur(8px);
656         opacity: .7;
657 }
658
659 #help {
660         width: 100%;
661         height: 100vh;
662         position: fixed;
663         top: 0;
664         left: 0;
665         display: flex;
666         justify-content: center;
667         align-items: center;
668 }
669 #help > div {
670         flex: 0 0 auto;
671         box-shadow: 0 0 6px rgba(0,0,0,.2);
672         width: 550px;
673         height: auto;
674         border: 1px solid;
675 }
676 #help dt {
677         float: left;
678         clear: left;
679         display: block;
680 }
681 #help dd { margin: 5px 35px; }
682 #help .infos { padding-left: 0; }
683 #help h1, #help h2 { margin-top: 0; }
684 #help > div div {
685         width: 50%;
686         float: left;
687         padding: 20px;
688         padding-left: 17px;
689 }
690
691 .stab {
692         display: table;
693         border-width: 1px;
694         border-style: solid;
695         padding: 3px;
696         margin-bottom: 5px;
697         font-size: 90%;
698 }
699 .stab p {
700         display: inline;
701 }
702
703 .stab summary {
704         display: list-item;
705 }
706
707 .stab .microscope {
708         font-size: 1.5em;
709 }
710
711 .module-item .stab {
712         display: inline;
713         border-width: 0;
714         padding: 0;
715         margin: 0;
716         background: inherit !important;
717 }
718
719 .module-item.unstable {
720         opacity: 0.65;
721 }
722
723 .since {
724         font-weight: normal;
725         font-size: initial;
726         position: absolute;
727         right: 0;
728         top: 0;
729 }
730
731 .variants_table {
732         width: 100%;
733 }
734
735 .variants_table tbody tr td:first-child {
736         width: 1%; /* make the variant name as small as possible */
737 }
738
739 td.summary-column {
740         width: 100%;
741 }
742
743 .summary {
744         padding-right: 0px;
745 }
746
747 pre.rust .question-mark {
748         font-weight: bold;
749 }
750
751 a.test-arrow {
752         display: inline-block;
753         position: absolute;
754         padding: 5px 10px 5px 10px;
755         border-radius: 5px;
756         font-size: 130%;
757         top: 5px;
758         right: 5px;
759 }
760 a.test-arrow:hover{
761         text-decoration: none;
762 }
763
764 .section-header:hover a:before {
765         position: absolute;
766         left: -25px;
767         padding-right: 10px; /* avoid gap that causes hover to disappear */
768         content: '\2002\00a7\2002';
769 }
770
771 .section-header:hover a {
772         text-decoration: none;
773 }
774
775 .section-header a {
776         color: inherit;
777 }
778
779 .collapse-toggle {
780         font-weight: 300;
781         position: absolute;
782         left: -23px;
783         top: 0;
784 }
785
786 h3 > .collapse-toggle, h4 > .collapse-toggle {
787         font-size: 0.8em;
788         top: 5px;
789 }
790
791 .toggle-wrapper > .collapse-toggle {
792         left: -24px;
793         margin-top: 0px;
794 }
795
796 .toggle-wrapper {
797         position: relative;
798         margin-top: 0;
799 }
800
801 .toggle-wrapper.collapsed {
802         height: 25px;
803         transition: height .2s;
804         margin-bottom: .6em;
805 }
806
807 .collapse-toggle > .inner {
808         display: inline-block;
809         width: 1.2ch;
810         text-align: center;
811 }
812
813 .ghost {
814         display: none;
815 }
816
817 .ghost + .since {
818         position: initial;
819         display: table-cell;
820 }
821
822 .since + .srclink {
823         display: table-cell;
824         padding-left: 10px;
825 }
826
827 .item-spacer {
828         width: 100%;
829         height: 12px;
830 }
831
832 span.since {
833         position: initial;
834         font-size: 20px;
835         margin-right: 5px;
836 }
837
838 .toggle-wrapper > .collapse-toggle {
839         left: 0;
840 }
841
842 .variant + .toggle-wrapper + .docblock > p {
843         margin-top: 5px;
844 }
845
846 .sub-variant, .sub-variant > h3 {
847         margin-top: 0 !important;
848 }
849
850 .toggle-label {
851         display: inline-block;
852         margin-left: 4px;
853         margin-top: 3px;
854 }
855
856 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
857         margin-left: 30px;
858         margin-bottom: 20px;
859         margin-top: 5px;
860 }
861
862 .docblock > .section-header:first-child {
863         margin-left: 15px;
864         margin-top: 0;
865 }
866
867 .docblock > .section-header:first-child:hover > a:before {
868         left: -10px;
869 }
870
871 .enum > .collapsed, .struct > .collapsed {
872         margin-bottom: 25px;
873 }
874
875 #main > .variant, #main > .structfield {
876         display: block;
877 }
878
879 .attributes {
880         display: block;
881         margin-top: 0px !important;
882         margin-right: 0px;
883         margin-bottom: 0px !important;
884         margin-left: 30px;
885 }
886 .toggle-attributes.collapsed {
887         margin-bottom: 0;
888 }
889 .impl-items > .toggle-attributes {
890         margin-left: 20px;
891 }
892 .impl-items .attributes {
893         font-weight: 500;
894 }
895
896 :target > code {
897         opacity: 1;
898 }
899
900 /* Media Queries */
901
902 @media (max-width: 700px) {
903         body {
904                 padding-top: 0px;
905         }
906
907         .sidebar {
908                 height: 45px;
909                 min-height: 40px;
910                 width: calc(100% + 30px);
911                 margin: 0;
912                 margin-left: -15px;
913                 padding: 0 15px;
914                 position: static;
915                 z-index: 1;
916         }
917
918         .sidebar > .location {
919                 float: right;
920                 margin: 0px;
921                 margin-top: 2px;
922                 padding: 3px 10px 1px 10px;
923                 min-height: 39px;
924                 background: inherit;
925                 text-align: left;
926                 font-size: 24px;
927         }
928
929         .sidebar .location:empty {
930                 padding: 0;
931         }
932
933         .sidebar img {
934                 width: 35px;
935                 margin-top: 5px;
936                 margin-bottom: 5px;
937                 float: left;
938                 margin-left: 50px;
939         }
940
941         .sidebar-menu {
942                 position: fixed;
943                 z-index: 10;
944                 font-size: 2rem;
945                 cursor: pointer;
946                 width: 45px;
947                 left: 0;
948                 text-align: center;
949                 display: block;
950                 border-bottom: 1px solid;
951                 border-right: 1px solid;
952                 height: 45px;
953         }
954
955         .sidebar-elems {
956                 position: fixed;
957                 z-index: 1;
958                 left: 0;
959                 top: 45px;
960                 bottom: 0;
961                 overflow-y: auto;
962                 border-right: 1px solid;
963                 display: none;
964         }
965
966         .sidebar > .block.version {
967                 border-bottom: none;
968                 margin-top: 12px;
969         }
970
971         nav.sub {
972                 width: calc(100% - 32px);
973                 float: right;
974         }
975
976         .content {
977                 margin-left: 0px;
978         }
979
980         #main {
981                 margin-top: 45px;
982                 padding: 0;
983         }
984
985         .content .in-band {
986                 width: 100%;
987         }
988
989         .content h4 > .out-of-band {
990                 position: inherit;
991         }
992
993         .toggle-wrapper > .collapse-toggle {
994                 left: 0px;
995         }
996
997         .toggle-wrapper {
998                 height: 1.5em;
999         }
1000
1001         #search {
1002                 margin-left: 0;
1003         }
1004
1005         .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1006                 display: flex;
1007         }
1008
1009         .anchor {
1010                 display: none !important;
1011         }
1012 }
1013
1014 @media print {
1015         nav.sub, .content .out-of-band, .collapse-toggle {
1016                 display: none;
1017         }
1018 }
1019
1020 .information {
1021         position: absolute;
1022         left: -20px;
1023         margin-top: 7px;
1024         z-index: 1;
1025 }
1026
1027 .tooltip {
1028         position: relative;
1029         display: inline-block;
1030         cursor: pointer;
1031 }
1032
1033 .tooltip .tooltiptext {
1034         width: 120px;
1035         display: none;
1036         text-align: center;
1037         padding: 5px 3px;
1038         border-radius: 6px;
1039         margin-left: 5px;
1040         top: -5px;
1041         left: 105%;
1042         z-index: 1;
1043 }
1044
1045 .tooltip:hover .tooltiptext {
1046         display: inline;
1047 }
1048
1049 .tooltip .tooltiptext::after {
1050         content: " ";
1051         position: absolute;
1052         top: 50%;
1053         left: 11px;
1054         margin-top: -5px;
1055         border-width: 5px;
1056         border-style: solid;
1057 }
1058
1059 .important-traits .tooltip .tooltiptext {
1060         border: 1px solid;
1061 }
1062
1063 pre.rust {
1064         position: relative;
1065         tab-width: 4;
1066         -moz-tab-width: 4;
1067 }
1068
1069 .search-failed {
1070         text-align: center;
1071         margin-top: 20px;
1072 }
1073
1074 #titles {
1075         height: 35px;
1076 }
1077
1078 #titles > div {
1079         float: left;
1080         width: 33.3%;
1081         text-align: center;
1082         border-bottom: 1px solid;
1083         font-size: 18px;
1084         cursor: pointer;
1085 }
1086
1087 #titles > div.selected {
1088         border-bottom: 3px solid;
1089 }
1090
1091 #titles > div:hover {
1092         border-bottom: 3px solid;
1093 }
1094
1095 #titles > div > div.count {
1096         display: inline-block;
1097         font-size: 16px;
1098 }
1099
1100 .important-traits {
1101         cursor: pointer;
1102         z-index: 2;
1103 }
1104
1105 h4 > .important-traits {
1106         position: absolute;
1107         left: -44px;
1108         top: 2px;
1109 }
1110
1111 @media (max-width: 700px) {
1112         h4 > .important-traits {
1113                 position: absolute;
1114                 left: -22px;
1115                 top: 24px;
1116         }
1117
1118         #titles > div > div.count {
1119                 float: left;
1120                 width: 100%;
1121         }
1122
1123         #titles {
1124                 height: 50px;
1125         }
1126
1127         .sidebar.mobile {
1128                 position: fixed;
1129                 width: 100%;
1130                 margin-left: 0;
1131                 background-color: rgba(0,0,0,0);
1132                 height: 100%;
1133         }
1134
1135         .show-it {
1136                 display: block;
1137                 width: 246px;
1138         }
1139
1140         .show-it > .block.items {
1141                 margin: 8px 0;
1142         }
1143
1144         .show-it > .block.items > ul {
1145                 margin: 0;
1146         }
1147
1148         .show-it > .block.items > ul > li {
1149                 text-align: center;
1150                 margin: 2px 0;
1151         }
1152
1153         .show-it > .block.items > ul > li > a {
1154                 font-size: 21px;
1155         }
1156
1157         /* Because of ios, we need to actually have a full height sidebar title so the
1158          * actual sidebar can show up. But then we need to make it transparent so we don't
1159          * hide content. The filler just allows to create the background for the sidebar
1160          * title. But because of the absolute position, I had to lower the z-index.
1161          */
1162         #sidebar-filler {
1163                 position: fixed;
1164                 left: 45px;
1165                 width: calc(100% - 45px);
1166                 top: 0;
1167                 height: 45px;
1168                 z-index: -1;
1169                 border-bottom: 1px solid;
1170         }
1171
1172         .collapse-toggle {
1173                 left: -20px;
1174         }
1175
1176         .impl > .collapse-toggle {
1177                 left: -10px;
1178         }
1179 }
1180
1181
1182 @media (max-width: 416px) {
1183         #titles {
1184                 height: 73px;
1185         }
1186
1187         #titles > div {
1188                 height: 73px;
1189         }
1190 }
1191
1192 .modal {
1193         position: fixed;
1194         width: 100vw;
1195         height: 100vh;
1196         z-index: 10000;
1197         top: 0;
1198         left: 0;
1199 }
1200
1201 .modal-content {
1202         display: block;
1203         max-width: 60%;
1204         min-width: 200px;
1205         padding: 8px;
1206         top: 40%;
1207         position: absolute;
1208         left: 50%;
1209         transform: translate(-50%, -40%);
1210         border: 1px solid;
1211         border-radius: 4px;
1212         border-top-right-radius: 0;
1213 }
1214
1215 .modal-content > .docblock {
1216         margin: 0;
1217 }
1218
1219 h3.important {
1220         margin: 0;
1221         margin-bottom: 13px;
1222         font-size: 19px;
1223 }
1224
1225 .modal-content > .docblock > code.content {
1226         margin: 0;
1227         padding: 0;
1228         font-size: 20px;
1229 }
1230
1231 .modal-content > .close {
1232         position: absolute;
1233         font-weight: 900;
1234         right: -25px;
1235         top: -1px;
1236         font-size: 18px;
1237         width: 25px;
1238         padding-right: 2px;
1239         border-top-right-radius: 5px;
1240         border-bottom-right-radius: 5px;
1241         text-align: center;
1242         border: 1px solid;
1243         border-right: 0;
1244         cursor: pointer;
1245 }
1246
1247 .modal-content > .whiter {
1248         height: 25px;
1249         position: absolute;
1250         width: 3px;
1251         right: -2px;
1252         top: 0px;
1253 }
1254
1255 #main > div.important-traits {
1256         position: absolute;
1257         left: -24px;
1258         margin-top: 16px;
1259 }
1260
1261 .content > .methods > div.important-traits {
1262         position: absolute;
1263         left: -42px;
1264         margin-top: 2px;
1265 }
1266
1267 kbd {
1268         display: inline-block;
1269         padding: 3px 5px;
1270         font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1271         line-height: 10px;
1272         vertical-align: middle;
1273         border: solid 1px;
1274         border-radius: 3px;
1275         box-shadow: inset 0 -1px 0;
1276         cursor: default;
1277 }
1278
1279 .theme-picker {
1280         position: absolute;
1281         left: 211px;
1282         top: 19px;
1283 }
1284
1285 .theme-picker button {
1286         outline: none;
1287 }
1288
1289 #settings-menu {
1290         position: absolute;
1291         right: 0;
1292         top: 10px;
1293         outline: none;
1294 }
1295
1296 #theme-picker, #settings-menu {
1297         padding: 4px;
1298         width: 27px;
1299         height: 29px;
1300         border: 1px solid;
1301         border-radius: 3px;
1302         cursor: pointer;
1303 }
1304
1305 #theme-choices {
1306         display: none;
1307         position: absolute;
1308         left: 0;
1309         top: 28px;
1310         border: 1px solid;
1311         border-radius: 3px;
1312         z-index: 1;
1313         cursor: pointer;
1314 }
1315
1316 #theme-choices > button {
1317         border: none;
1318         width: 100%;
1319         padding: 4px;
1320         text-align: center;
1321         background: rgba(0,0,0,0);
1322 }
1323
1324 #theme-choices > button:not(:first-child) {
1325         border-top: 1px solid;
1326 }
1327
1328 @media (max-width: 700px) {
1329         .theme-picker {
1330                 left: 10px;
1331                 top: 54px;
1332                 z-index: 1;
1333         }
1334 }
1335
1336 .hidden-by-impl-hider,
1337 .hidden-by-usual-hider {
1338         /* important because of conflicting rule for small screens */
1339         display: none !important;
1340 }
1341
1342 #implementations-list > h3 > span.in-band {
1343         width: 100%;
1344 }
1345
1346 .table-display {
1347         width: 100%;
1348         border: 0;
1349         border-collapse: collapse;
1350         border-spacing: 0;
1351         font-size: 16px;
1352 }
1353
1354 .table-display tr td:first-child {
1355         padding-right: 0;
1356 }
1357
1358 .table-display tr td:last-child {
1359         float: right;
1360 }
1361 .table-display .out-of-band {
1362         position: relative;
1363         font-size: 19px;
1364         display: block;
1365 }
1366
1367 #main > ul {
1368         padding-left: 10px;
1369 }
1370 #main > ul > li {
1371         list-style: none;
1372 }
1373 #all-types {
1374         text-align: center;
1375         border: 1px solid;
1376         margin: 0 10px;
1377         margin-bottom: 10px;
1378         display: block;
1379         border-radius: 7px;
1380 }
1381 #all-types > p {
1382         margin: 5px 0;
1383 }
1384
1385 .non-exhaustive {
1386         margin-bottom: 1em;
1387 }