]> git.proxmox.com Git - rustc.git/blame - src/librustdoc/html/static/rustdoc.css
New upstream version 1.41.1+dfsg1
[rustc.git] / src / librustdoc / html / static / rustdoc.css
CommitLineData
b039eaaf 1/* See FiraSans-LICENSE.txt for the Fira Sans license. */
1a4d82fc 2@font-face {
476ff2be
SL
3 font-family: 'Fira Sans';
4 font-style: normal;
5 font-weight: 400;
6 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
1a4d82fc
JJ
7}
8@font-face {
476ff2be
SL
9 font-family: 'Fira Sans';
10 font-style: normal;
11 font-weight: 500;
12 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
1a4d82fc 13}
b039eaaf 14
0731742a 15/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */
1a4d82fc 16@font-face {
476ff2be
SL
17 font-family: 'Source Serif Pro';
18 font-style: normal;
19 font-weight: 400;
0731742a 20 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff');
1a4d82fc
JJ
21}
22@font-face {
476ff2be
SL
23 font-family: 'Source Serif Pro';
24 font-style: italic;
25 font-weight: 400;
0731742a 26 src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff');
1a4d82fc
JJ
27}
28@font-face {
476ff2be
SL
29 font-family: 'Source Serif Pro';
30 font-style: normal;
31 font-weight: 700;
0731742a 32 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff');
1a4d82fc 33}
b039eaaf
SL
34
35/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
1a4d82fc 36@font-face {
476ff2be
SL
37 font-family: 'Source Code Pro';
38 font-style: normal;
39 font-weight: 400;
40 /* Avoid using locally installed font because bad versions are in circulation:
41 * see https://github.com/rust-lang/rust/issues/24355 */
42 src: url("SourceCodePro-Regular.woff") format('woff');
1a4d82fc
JJ
43}
44@font-face {
476ff2be
SL
45 font-family: 'Source Code Pro';
46 font-style: normal;
47 font-weight: 600;
48 src: url("SourceCodePro-Semibold.woff") format('woff');
1a4d82fc
JJ
49}
50
1a4d82fc
JJ
51* {
52 -webkit-box-sizing: border-box;
476ff2be
SL
53 -moz-box-sizing: border-box;
54 box-sizing: border-box;
1a4d82fc
JJ
55}
56
e1599b0c
XL
57/* This part handles the "default" theme being used depending on the system one. */
58html {
59 content: "";
60}
61@media (prefers-color-scheme: light) {
62 html {
63 content: "light";
64 }
65}
66@media (prefers-color-scheme: dark) {
67 html {
68 content: "dark";
69 }
70}
71
1a4d82fc
JJ
72/* General structure and fonts */
73
74body {
a1dfa0c6 75 font: 16px/1.4 "Source Serif Pro", serif;
476ff2be
SL
76 margin: 0;
77 position: relative;
78 padding: 10px 15px 20px 15px;
1a4d82fc 79
476ff2be
SL
80 -webkit-font-feature-settings: "kern", "liga";
81 -moz-font-feature-settings: "kern", "liga";
82 font-feature-settings: "kern", "liga";
1a4d82fc
JJ
83}
84
85h1 {
476ff2be 86 font-size: 1.5em;
1a4d82fc
JJ
87}
88h2 {
476ff2be 89 font-size: 1.4em;
1a4d82fc
JJ
90}
91h3 {
476ff2be 92 font-size: 1.3em;
1a4d82fc 93}
ff7c6d11 94h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
476ff2be
SL
95 font-weight: 500;
96 margin: 20px 0 15px 0;
97 padding-bottom: 6px;
1a4d82fc
JJ
98}
99h1.fqn {
476ff2be
SL
100 border-bottom: 1px dashed;
101 margin-top: 0;
1a4d82fc 102}
8bb4bdeb 103h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
476ff2be 104 border-bottom: 1px solid;
1a4d82fc 105}
8bb4bdeb 106h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
0731742a 107 flex-basis: 100%;
476ff2be 108 font-weight: 600;
0731742a 109 margin-top: 16px;
476ff2be
SL
110 margin-bottom: 10px;
111 position: relative;
1a4d82fc
JJ
112}
113h3.impl, h3.method, h3.type {
0531ce1d 114 padding-left: 15px;
1a4d82fc 115}
ea8adc8c
XL
116
117h1, h2, h3, h4,
118.sidebar, a.source, .search-input, .content table :not(code)>a,
a1dfa0c6
XL
119.collapse-toggle, div.item-list .out-of-band,
120#source-sidebar, #sidebar-toggle {
121 font-family: "Fira Sans", sans-serif;
1a4d82fc
JJ
122}
123
124ol, ul {
476ff2be 125 padding-left: 25px;
1a4d82fc
JJ
126}
127ul ul, ol ul, ul ol, ol ol {
a1dfa0c6 128 margin-bottom: .6em;
1a4d82fc
JJ
129}
130
131p {
476ff2be 132 margin: 0 0 .6em 0;
1a4d82fc
JJ
133}
134
3b2f2976
XL
135summary {
136 outline: none;
137}
138
1a4d82fc 139code, pre {
a1dfa0c6 140 font-family: "Source Code Pro", monospace;
1a4d82fc 141}
9e0c209e 142.docblock code, .docblock-short code {
476ff2be 143 border-radius: 3px;
0bf4aa26 144 padding: 0 0.1em;
1a4d82fc 145}
ff7c6d11 146.docblock pre code, .docblock-short pre code, .docblock code.spotlight {
476ff2be 147 padding: 0;
c1a9b12d 148}
ff7c6d11
XL
149.docblock code.spotlight :last-child {
150 padding-bottom: 0.6em;
151}
1a4d82fc 152pre {
476ff2be 153 padding: 14px;
1a4d82fc
JJ
154}
155
8bb4bdeb 156.source .content pre {
476ff2be 157 padding: 20px;
1a4d82fc
JJ
158}
159
9cc50fc6 160img {
476ff2be 161 max-width: 100%;
9cc50fc6
SL
162}
163
416331ca
XL
164li {
165 position: relative;
166}
167
8bb4bdeb 168.source .content {
476ff2be
SL
169 margin-top: 50px;
170 max-width: none;
171 overflow: visible;
172 margin-left: 0px;
173 min-width: 70em;
1a4d82fc
JJ
174}
175
176nav.sub {
476ff2be
SL
177 font-size: 16px;
178 text-transform: uppercase;
1a4d82fc
JJ
179}
180
181.sidebar {
476ff2be 182 width: 200px;
abe05a73 183 position: fixed;
476ff2be
SL
184 left: 0;
185 top: 0;
e74abb32 186 bottom: 0;
abe05a73 187 overflow: auto;
8bb4bdeb
XL
188}
189
2c00a5a8 190.sidebar .block > ul > li {
0531ce1d 191 margin-right: -10px;
1a4d82fc
JJ
192}
193
2c00a5a8
XL
194.content, nav {
195 max-width: 960px;
196}
1a4d82fc
JJ
197
198/* Everything else */
199
60c5eb7d 200.hidden {
2c00a5a8
XL
201 display: none !important;
202}
1a4d82fc 203
48663c56
XL
204.logo-container {
205 height: 100px;
206 width: 100px;
207 position: relative;
476ff2be
SL
208 margin: 20px auto;
209 display: block;
abe05a73 210 margin-top: 10px;
1a4d82fc
JJ
211}
212
48663c56
XL
213.logo-container > img {
214 max-width: 100px;
215 max-height: 100px;
216 position: absolute;
217 left: 50%;
218 top: 50%;
219 transform: translate(-50%, -50%);
220 display: block;
221}
222
1a4d82fc 223.sidebar .location {
8bb4bdeb 224 border: 1px solid;
476ff2be 225 font-size: 17px;
abe05a73 226 margin: 30px 10px 20px 10px;
476ff2be 227 text-align: center;
7cac9316 228 word-wrap: break-word;
1a4d82fc
JJ
229}
230
abe05a73
XL
231.sidebar .version {
232 font-size: 15px;
233 text-align: center;
ff7c6d11 234 border-bottom: 1px solid;
abe05a73
XL
235 overflow-wrap: break-word;
236 word-wrap: break-word; /* deprecated */
237 word-break: break-word; /* Chrome, non-standard */
238}
239
8bb4bdeb
XL
240.location:empty {
241 border: none;
242}
243
2c00a5a8
XL
244.location a:first-child {
245 font-weight: 500;
246}
1a4d82fc
JJ
247
248.block {
abe05a73 249 padding: 0;
476ff2be 250 margin-bottom: 14px;
1a4d82fc 251}
e9174d1e 252.block h2, .block h3 {
476ff2be
SL
253 margin-top: 0;
254 margin-bottom: 8px;
255 text-align: center;
1a4d82fc 256}
e9174d1e 257.block ul, .block li {
abe05a73 258 margin: 0 10px;
476ff2be
SL
259 padding: 0;
260 list-style: none;
e9174d1e 261}
1a4d82fc
JJ
262
263.block a {
476ff2be
SL
264 display: block;
265 text-overflow: ellipsis;
266 overflow: hidden;
267 line-height: 15px;
268 padding: 7px 5px;
269 font-size: 14px;
270 font-weight: 300;
271 transition: border 500ms ease-out;
1a4d82fc
JJ
272}
273
abe05a73 274.sidebar-title {
ff7c6d11
XL
275 border-top: 1px solid;
276 border-bottom: 1px solid;
abe05a73
XL
277 text-align: center;
278 font-size: 17px;
279 margin-bottom: 5px;
280}
281
282.sidebar-links {
283 margin-bottom: 15px;
284}
285
286.sidebar-links > a {
287 padding-left: 10px;
288 width: 100%;
289}
290
ff7c6d11
XL
291.sidebar-menu {
292 display: none;
293}
294
1a4d82fc 295.content {
476ff2be 296 padding: 15px 0;
1a4d82fc
JJ
297}
298
8bb4bdeb 299.source .content pre.rust {
476ff2be
SL
300 white-space: pre;
301 overflow: auto;
302 padding-left: 0;
1a4d82fc 303}
ff7c6d11 304
69743fb6 305.rustdoc:not(.source) .example-wrap {
a1dfa0c6
XL
306 display: inline-flex;
307 margin-bottom: 10px;
308}
309
310.example-wrap {
311 width: 100%;
312}
313
314.example-wrap > pre.line-number {
315 overflow: initial;
316 border: 1px solid;
317 border-top-left-radius: 5px;
318 border-bottom-left-radius: 5px;
319 padding: 13px 8px;
320 text-align: right;
321}
322
69743fb6 323.rustdoc:not(.source) .example-wrap > pre.rust {
a1dfa0c6 324 width: 100%;
0731742a 325 overflow-x: auto;
a1dfa0c6
XL
326}
327
69743fb6 328.rustdoc:not(.source) .example-wrap > pre {
a1dfa0c6
XL
329 margin: 0;
330}
331
7cac9316
XL
332#search {
333 margin-left: 230px;
ff7c6d11
XL
334 position: relative;
335}
336
337#results {
338 position: absolute;
339 right: 0;
340 left: 0;
341 overflow: auto;
7cac9316 342}
ff7c6d11 343
0531ce1d
XL
344#results > table {
345 width: 100%;
346 table-layout: fixed;
347}
348
1a4d82fc 349.content pre.line-numbers {
476ff2be
SL
350 float: left;
351 border: none;
352 position: relative;
1a4d82fc 353
476ff2be
SL
354 -webkit-user-select: none;
355 -moz-user-select: none;
356 -ms-user-select: none;
357 user-select: none;
1a4d82fc 358}
2c00a5a8
XL
359.line-numbers span {
360 cursor: pointer;
361}
1a4d82fc 362
9e0c209e 363.docblock-short p {
476ff2be 364 display: inline;
d9579d0f
AL
365}
366
9e0c209e 367.docblock-short.nowrap {
476ff2be
SL
368 display: block;
369 overflow: hidden;
370 white-space: nowrap;
371 text-overflow: ellipsis;
1a4d82fc
JJ
372}
373
9e0c209e 374.docblock-short p {
476ff2be
SL
375 overflow: hidden;
376 text-overflow: ellipsis;
377 margin: 0;
1a4d82fc 378}
60c5eb7d 379.docblock code, .docblock-short code {
48663c56 380 white-space: pre-wrap;
2c00a5a8 381}
1a4d82fc
JJ
382
383.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
476ff2be 384 border-bottom: 1px solid;
1a4d82fc
JJ
385}
386
3b2f2976
XL
387#main > .docblock h1 { font-size: 1.3em; }
388#main > .docblock h2 { font-size: 1.15em; }
389#main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
390
0731742a
XL
391#main > h2 + div, #main > h2 + h3, #main > h3 + div {
392 display: none; /* Changed to flex or block via js once the page is loaded */
393 flex-wrap: wrap;
394}
395
3b2f2976
XL
396.docblock h1 { font-size: 1em; }
397.docblock h2 { font-size: 0.95em; }
398.docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
1a4d82fc 399
3157f602 400.docblock {
476ff2be 401 margin-left: 24px;
ea8adc8c 402 position: relative;
3157f602
XL
403}
404
1a4d82fc 405.content .out-of-band {
b7449926 406 float: right;
476ff2be
SL
407 font-size: 23px;
408 margin: 0px;
409 padding: 0px;
476ff2be 410 font-weight: normal;
a7813a04
XL
411}
412
413h3.impl > .out-of-band {
476ff2be 414 font-size: 21px;
a7813a04
XL
415}
416
3b2f2976
XL
417h4.method > .out-of-band {
418 font-size: 19px;
419}
420
9e0c209e 421h4 > code, h3 > code, .invisible > code {
2c00a5a8
XL
422 max-width: calc(100% - 41px);
423 display: block;
a7813a04
XL
424}
425
9e0c209e 426.invisible {
476ff2be
SL
427 width: 100%;
428 display: inline-block;
9e0c209e
SL
429}
430
1a4d82fc 431.content .in-band {
476ff2be
SL
432 margin: 0px;
433 padding: 0px;
1a4d82fc
JJ
434}
435
ea8adc8c
XL
436.in-band > code {
437 display: inline-block;
438}
439
2c00a5a8
XL
440#main {
441 position: relative;
442}
a7813a04 443#main > .since {
476ff2be 444 top: inherit;
a1dfa0c6 445 font-family: "Fira Sans", sans-serif;
a7813a04
XL
446}
447
0531ce1d 448.content table:not(.table-display) {
476ff2be 449 border-spacing: 0 5px;
1a4d82fc
JJ
450}
451.content td { vertical-align: top; }
452.content td:first-child { padding-right: 20px; }
453.content td p:first-child { margin-top: 0; }
454.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
8faf50e0 455.content tr:first-child td { border-top: 0; }
1a4d82fc 456
85aaf69f 457.docblock table {
476ff2be 458 margin: .5em 0;
9fa01778
XL
459 width: calc(100% - 2px);
460 border: 1px dashed;
85aaf69f
SL
461}
462
463.docblock table td {
476ff2be 464 padding: .5em;
8faf50e0 465 border: 1px dashed;
85aaf69f
SL
466}
467
468.docblock table th {
476ff2be
SL
469 padding: .5em;
470 text-align: left;
8faf50e0 471 border: 1px solid;
476ff2be
SL
472}
473
474.fields + table {
475 margin-bottom: 1em;
85aaf69f
SL
476}
477
1a4d82fc 478.content .item-list {
476ff2be
SL
479 list-style-type: none;
480 padding: 0;
1a4d82fc
JJ
481}
482
1a4d82fc 483.content .multi-column {
476ff2be
SL
484 -moz-column-count: 5;
485 -moz-column-gap: 2.5em;
486 -webkit-column-count: 5;
487 -webkit-column-gap: 2.5em;
488 column-count: 5;
489 column-gap: 2.5em;
1a4d82fc
JJ
490}
491.content .multi-column li { width: 100%; display: inline-block; }
492
493.content .method {
476ff2be
SL
494 font-size: 1em;
495 position: relative;
1a4d82fc 496}
62682a34 497/* Shift "where ..." part of method or fn definition down a line */
476ff2be
SL
498.content .method .where,
499.content .fn .where,
500.content .where.fmt-newline {
8bb4bdeb 501 display: block;
7cac9316 502 font-size: 0.8em;
476ff2be 503}
1a4d82fc 504
0531ce1d
XL
505.content .methods > div:not(.important-traits) {
506 margin-left: 40px;
507 margin-bottom: 15px;
508}
1a4d82fc 509
94b46f34 510.content .docblock > .impl-items {
476ff2be 511 margin-left: 20px;
94b46f34
XL
512 margin-top: -34px;
513}
514.content .docblock > .impl-items > h4 {
515 border-bottom: 0;
516}
517.content .docblock >.impl-items .table-display {
518 margin: 0;
519}
520.content .docblock >.impl-items table td {
521 padding: 0;
522}
523.toggle-wrapper.marg-left > .collapse-toggle {
524 left: -24px;
525}
526.content .docblock > .impl-items .table-display, .impl-items table td {
527 border: none;
d9579d0f 528}
1a4d82fc 529
e9174d1e 530.content .stability code {
476ff2be 531 font-size: 90%;
e9174d1e
SL
532}
533
b7449926
XL
534.content .stability {
535 position: relative;
536 margin-left: 33px;
537 margin-top: -13px;
538}
539
a1dfa0c6
XL
540.sub-variant > div > .stability {
541 margin-top: initial;
542}
543
b7449926
XL
544.content .stability::before {
545 content: '˪';
546 font-size: 30px;
547 position: absolute;
548 top: -9px;
549 left: -13px;
550}
a1dfa0c6
XL
551
552.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
553 margin-left: 20px;
554}
555
556.content .impl-items .docblock, .content .impl-items .stability {
557 margin-bottom: .6em;
558}
559
560.content .impl-items > .stability {
561 margin-left: 40px;
562}
563
564.methods > .stability, .content .impl-items > .stability {
b7449926
XL
565 margin-top: -8px;
566}
567
0731742a
XL
568.impl-items {
569 flex-basis: 100%;
570}
571
b7449926
XL
572#main > .stability {
573 margin-top: 0;
574}
575
e74abb32 576nav:not(.sidebar) {
476ff2be
SL
577 border-bottom: 1px solid;
578 padding-bottom: 10px;
579 margin-bottom: 10px;
1a4d82fc
JJ
580}
581nav.main {
476ff2be
SL
582 padding: 20px 0;
583 text-align: center;
1a4d82fc
JJ
584}
585nav.main .current {
476ff2be
SL
586 border-top: 1px solid;
587 border-bottom: 1px solid;
1a4d82fc
JJ
588}
589nav.main .separator {
476ff2be
SL
590 border: 1px solid;
591 display: inline-block;
592 height: 23px;
593 margin: 0 20px;
1a4d82fc
JJ
594}
595nav.sum { text-align: right; }
596nav.sub form { display: inline; }
597
e9174d1e 598nav.sub, .content {
476ff2be 599 margin-left: 230px;
1a4d82fc
JJ
600}
601
602a {
476ff2be
SL
603 text-decoration: none;
604 background: transparent;
1a4d82fc 605}
c34b1796 606
3b2f2976
XL
607.small-section-header:hover > .anchor {
608 display: initial;
609}
610
611.in-band:hover > .anchor {
ea8adc8c
XL
612 display: inline-block;
613 position: absolute;
3b2f2976
XL
614}
615.anchor {
616 display: none;
ea8adc8c 617 position: absolute;
0531ce1d 618 left: -7px;
ea8adc8c
XL
619}
620.anchor.field {
0531ce1d
XL
621 left: -5px;
622}
623.small-section-header > .anchor {
624 left: -28px;
b7449926 625 padding-right: 10px; /* avoid gap that causes hover to disappear */
3b2f2976 626}
ea8adc8c 627.anchor:before {
3b2f2976
XL
628 content: '\2002\00a7\2002';
629}
630
94b46f34
XL
631.docblock a:not(.srclink):not(.test-arrow):hover,
632.docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
476ff2be 633 text-decoration: underline;
c34b1796 634}
1a4d82fc 635
0731742a 636.invisible > .srclink, h4 > code + .srclink {
b7449926
XL
637 position: absolute;
638 top: 0;
639 right: 0;
640 font-size: 17px;
641 font-weight: normal;
642}
643
e9174d1e 644.block a.current.crate { font-weight: 500; }
1a4d82fc 645
83c7162d
XL
646.search-container {
647 position: relative;
648}
0731742a
XL
649.search-container > div {
650 display: inline-flex;
651 width: calc(100% - 34px);
652}
653#crate-search {
654 margin-top: 5px;
655 padding: 6px;
656 padding-right: 19px;
416331ca 657 flex: none;
0731742a
XL
658 border: 0;
659 border-right: 0;
660 border-radius: 4px 0 0 4px;
661 outline: none;
662 cursor: pointer;
663 border-right: 1px solid;
664 -moz-appearance: none;
665 -webkit-appearance: none;
666 /* Removes default arrow from firefox */
667 text-indent: 0.01px;
668 text-overflow: "";
669 background-repeat: no-repeat;
670 background-color: transparent;
671 background-size: 20px;
672 background-position: calc(100% - 1px) 56%;
673}
83c7162d
XL
674.search-container > .top-button {
675 position: absolute;
676 right: 0;
677 top: 10px;
678}
1a4d82fc 679.search-input {
476ff2be
SL
680 /* Override Normalize.css: we have margins and do
681 not want to overflow - the `moz` attribute is necessary
682 until Firefox 29, too early to drop at this point */
683 -moz-box-sizing: border-box !important;
684 box-sizing: border-box !important;
685 outline: none;
686 border: none;
687 border-radius: 1px;
688 margin-top: 5px;
689 padding: 10px 16px;
690 font-size: 17px;
691 transition: border-color 300ms ease;
692 transition: border-radius 300ms ease-in-out;
693 transition: box-shadow 300ms ease-in-out;
48663c56 694 width: 100%;
0731742a
XL
695}
696
697#crate-search + .search-input {
698 border-radius: 0 1px 1px 0;
48663c56 699 width: calc(100% - 32px);
1a4d82fc
JJ
700}
701
702.search-input:focus {
476ff2be
SL
703 border-radius: 2px;
704 border: 0;
705 outline: 0;
1a4d82fc
JJ
706}
707
708.search-results .desc {
476ff2be
SL
709 white-space: nowrap;
710 text-overflow: ellipsis;
711 overflow: hidden;
712 display: block;
1a4d82fc
JJ
713}
714
715.search-results a {
476ff2be 716 display: block;
1a4d82fc
JJ
717}
718
0531ce1d
XL
719.content .search-results td:first-child {
720 padding-right: 0;
b7449926 721 width: 50%;
0531ce1d
XL
722}
723.content .search-results td:first-child a {
724 padding-right: 10px;
725}
b7449926 726.content .search-results td:first-child a:after {
a1dfa0c6
XL
727 clear: both;
728 content: "";
729 display: block;
b7449926 730}
0531ce1d
XL
731.content .search-results td:first-child a span {
732 float: left;
733}
1a4d82fc 734
abe05a73 735tr.result span.primitive::after {
ff7c6d11
XL
736 content: ' (primitive type)';
737 font-style: italic;
9e0c209e 738}
62682a34 739
94b46f34
XL
740tr.result span.keyword::after {
741 content: ' (keyword)';
742 font-style: italic;
743}
744
c1a9b12d 745body.blur > :not(#help) {
476ff2be
SL
746 filter: blur(8px);
747 -webkit-filter: blur(8px);
748 opacity: .7;
c1a9b12d
SL
749}
750
1a4d82fc 751#help {
476ff2be
SL
752 width: 100%;
753 height: 100vh;
754 position: fixed;
755 top: 0;
756 left: 0;
757 display: flex;
758 justify-content: center;
759 align-items: center;
c1a9b12d
SL
760}
761#help > div {
476ff2be 762 flex: 0 0 auto;
476ff2be
SL
763 box-shadow: 0 0 6px rgba(0,0,0,.2);
764 width: 550px;
2c00a5a8 765 height: auto;
8bb4bdeb 766 border: 1px solid;
1a4d82fc 767}
1a4d82fc 768#help dt {
476ff2be 769 float: left;
476ff2be
SL
770 clear: left;
771 display: block;
1a4d82fc 772}
abe05a73 773#help dd { margin: 5px 35px; }
1a4d82fc 774#help .infos { padding-left: 0; }
e9174d1e 775#help h1, #help h2 { margin-top: 0; }
c1a9b12d 776#help > div div {
476ff2be
SL
777 width: 50%;
778 float: left;
779 padding: 20px;
abe05a73 780 padding-left: 17px;
1a4d82fc
JJ
781}
782
32a655c1
SL
783.stab {
784 display: table;
476ff2be
SL
785 border-width: 1px;
786 border-style: solid;
787 padding: 3px;
788 margin-bottom: 5px;
789 font-size: 90%;
1a4d82fc 790}
32a655c1 791.stab p {
476ff2be 792 display: inline;
1a4d82fc
JJ
793}
794
32a655c1
SL
795.stab summary {
796 display: list-item;
797}
798
0731742a 799.stab .emoji {
32a655c1
SL
800 font-size: 1.5em;
801}
802
d9579d0f 803.module-item .stab {
9fa01778
XL
804 border-radius: 3px;
805 display: inline-block;
806 font-size: 80%;
807 line-height: 1.2;
808 margin-bottom: 0;
809 margin-right: .3em;
810 padding: 2px;
811 vertical-align: text-bottom;
1a4d82fc
JJ
812}
813
d9579d0f 814.module-item.unstable {
476ff2be 815 opacity: 0.65;
d9579d0f 816}
1a4d82fc 817
a7813a04 818.since {
476ff2be
SL
819 font-weight: normal;
820 font-size: initial;
476ff2be
SL
821 position: absolute;
822 right: 0;
823 top: 0;
7453a54e
SL
824}
825
0731742a
XL
826.impl-items .since, .impl .since {
827 flex-grow: 0;
828 padding-left: 12px;
829 padding-right: 2px;
830 position: initial;
831}
832
833.impl-items .srclink, .impl .srclink {
834 flex-grow: 0;
835 /* Override header settings otherwise it's too bold */
836 font-size: 17px;
837 font-weight: normal;
838}
839
840.impl-items code, .impl code {
841 flex-grow: 1;
842}
843
844.impl-items h4, h4.impl, h3.impl {
845 display: flex;
846 flex-basis: 100%;
847 font-size: 16px;
848 margin-bottom: 12px;
849 /* Push the src link out to the right edge consistently */
850 justify-content: space-between;
851}
852
7453a54e 853.variants_table {
476ff2be 854 width: 100%;
7453a54e
SL
855}
856
857.variants_table tbody tr td:first-child {
476ff2be 858 width: 1%; /* make the variant name as small as possible */
7453a54e
SL
859}
860
c34b1796 861td.summary-column {
476ff2be 862 width: 100%;
c34b1796
AL
863}
864
1a4d82fc 865.summary {
476ff2be 866 padding-right: 0px;
1a4d82fc 867}
1a4d82fc 868
c30ab7b3 869pre.rust .question-mark {
476ff2be 870 font-weight: bold;
c30ab7b3 871}
1a4d82fc 872
b039eaaf 873a.test-arrow {
476ff2be
SL
874 display: inline-block;
875 position: absolute;
876 padding: 5px 10px 5px 10px;
877 border-radius: 5px;
878 font-size: 130%;
879 top: 5px;
880 right: 5px;
1a4d82fc 881}
9e0c209e 882a.test-arrow:hover{
476ff2be 883 text-decoration: none;
9e0c209e 884}
1a4d82fc 885
ea8adc8c
XL
886.section-header:hover a:before {
887 position: absolute;
888 left: -25px;
b7449926 889 padding-right: 10px; /* avoid gap that causes hover to disappear */
476ff2be 890 content: '\2002\00a7\2002';
1a4d82fc
JJ
891}
892
c34b1796 893.section-header:hover a {
476ff2be 894 text-decoration: none;
c34b1796
AL
895}
896
897.section-header a {
476ff2be 898 color: inherit;
c34b1796
AL
899}
900
1a4d82fc 901.collapse-toggle {
476ff2be
SL
902 font-weight: 300;
903 position: absolute;
904 left: -23px;
476ff2be 905 top: 0;
1a4d82fc
JJ
906}
907
7cac9316
XL
908h3 > .collapse-toggle, h4 > .collapse-toggle {
909 font-size: 0.8em;
910 top: 5px;
911}
912
1a4d82fc 913.toggle-wrapper > .collapse-toggle {
476ff2be
SL
914 left: -24px;
915 margin-top: 0px;
1a4d82fc
JJ
916}
917
918.toggle-wrapper {
476ff2be 919 position: relative;
94b46f34 920 margin-top: 0;
1a4d82fc
JJ
921}
922
923.toggle-wrapper.collapsed {
ea8adc8c 924 height: 25px;
476ff2be 925 transition: height .2s;
ea8adc8c 926 margin-bottom: .6em;
1a4d82fc
JJ
927}
928
929.collapse-toggle > .inner {
476ff2be
SL
930 display: inline-block;
931 width: 1.2ch;
932 text-align: center;
1a4d82fc
JJ
933}
934
a1dfa0c6
XL
935.collapse-toggle.hidden-default {
936 position: relative;
937 margin-left: 20px;
938}
939
a7813a04 940.since + .srclink {
476ff2be
SL
941 display: table-cell;
942 padding-left: 10px;
a7813a04
XL
943}
944
041b39d2
XL
945.item-spacer {
946 width: 100%;
947 height: 12px;
948}
949
48663c56 950.out-of-band > span.since {
476ff2be
SL
951 position: initial;
952 font-size: 20px;
953 margin-right: 5px;
a7813a04 954}
1a4d82fc 955
5bcae85e 956.toggle-wrapper > .collapse-toggle {
476ff2be 957 left: 0;
5bcae85e
SL
958}
959
3b2f2976
XL
960.variant + .toggle-wrapper + .docblock > p {
961 margin-top: 5px;
962}
963
476ff2be 964.sub-variant, .sub-variant > h3 {
a1dfa0c6
XL
965 margin-top: 1px !important;
966}
967
968#main > .sub-variant > h3 {
969 font-size: 15px;
970 margin-left: 25px;
971 margin-bottom: 5px;
972}
973
974.sub-variant > div {
975 margin-left: 20px;
976 margin-bottom: 10px;
977}
978
979.sub-variant > div > span {
980 display: block;
981 position: relative;
3157f602
XL
982}
983
ea8adc8c
XL
984.toggle-label {
985 display: inline-block;
986 margin-left: 4px;
987 margin-top: 3px;
988}
989
3157f602 990.enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
476ff2be
SL
991 margin-left: 30px;
992 margin-bottom: 20px;
993 margin-top: 5px;
3157f602
XL
994}
995
abe05a73
XL
996.docblock > .section-header:first-child {
997 margin-left: 15px;
998 margin-top: 0;
999}
1000
1001.docblock > .section-header:first-child:hover > a:before {
1002 left: -10px;
1003}
1004
3157f602 1005.enum > .collapsed, .struct > .collapsed {
476ff2be 1006 margin-bottom: 25px;
3157f602
XL
1007}
1008
3b2f2976 1009#main > .variant, #main > .structfield {
476ff2be
SL
1010 display: block;
1011}
1012
1013.attributes {
1014 display: block;
94b46f34
XL
1015 margin-top: 0px !important;
1016 margin-right: 0px;
1017 margin-bottom: 0px !important;
1018 margin-left: 30px;
476ff2be
SL
1019}
1020.toggle-attributes.collapsed {
94b46f34
XL
1021 margin-bottom: 0;
1022}
1023.impl-items > .toggle-attributes {
1024 margin-left: 20px;
1025}
1026.impl-items .attributes {
1027 font-weight: 500;
3157f602
XL
1028}
1029
a7813a04 1030:target > code {
8bb4bdeb 1031 opacity: 1;
a7813a04 1032}
1a4d82fc 1033
48663c56
XL
1034.information {
1035 position: absolute;
1036 left: -20px;
1037 margin-top: 7px;
1038 z-index: 1;
1039}
1040
1041.tooltip {
1042 position: relative;
1043 display: inline-block;
1044 cursor: pointer;
1045}
1046
1047.tooltip .tooltiptext {
1048 width: 120px;
1049 display: none;
1050 text-align: center;
1051 padding: 5px 3px;
1052 border-radius: 6px;
1053 margin-left: 5px;
1054 top: -5px;
1055 left: 105%;
1056 z-index: 10;
1057}
1058
1059.tooltip:hover .tooltiptext {
1060 display: inline;
1061}
1062
1063.tooltip .tooltiptext::after {
1064 content: " ";
1065 position: absolute;
1066 top: 50%;
1067 left: 11px;
1068 margin-top: -5px;
1069 border-width: 5px;
1070 border-style: solid;
1071}
1072
1073.important-traits .tooltip .tooltiptext {
1074 border: 1px solid;
1075}
1076
1077pre.rust {
1078 position: relative;
1079 tab-width: 4;
1080 -moz-tab-width: 4;
1081}
1082
1083.search-failed {
1084 text-align: center;
1085 margin-top: 20px;
1086}
1087
1088.search-failed > ul {
1089 text-align: left;
1090 max-width: 570px;
1091 margin-left: auto;
1092 margin-right: auto;
1093}
1094
1095#titles {
1096 height: 35px;
1097}
1098
1099#titles > div {
1100 float: left;
1101 width: 33.3%;
1102 text-align: center;
1103 font-size: 18px;
1104 cursor: pointer;
1105 border-top: 2px solid;
1106}
1107
1108#titles > div:not(:last-child) {
1109 margin-right: 1px;
1110 width: calc(33.3% - 1px);
1111}
1112
1113#titles > div > div.count {
1114 display: inline-block;
1115 font-size: 16px;
1116}
1117
1118.important-traits {
1119 cursor: pointer;
1120 z-index: 2;
1121}
1122
1123h4 > .important-traits {
1124 position: absolute;
1125 left: -44px;
1126 top: 2px;
1127}
1128
1129#all-types {
1130 text-align: center;
1131 border: 1px solid;
1132 margin: 0 10px;
1133 margin-bottom: 10px;
1134 display: block;
1135 border-radius: 7px;
1136}
1137#all-types > p {
1138 margin: 5px 0;
1139}
1140
1141#sidebar-toggle {
1142 position: fixed;
1143 top: 30px;
1144 left: 300px;
1145 z-index: 10;
1146 padding: 3px;
1147 border-top-right-radius: 3px;
1148 border-bottom-right-radius: 3px;
1149 cursor: pointer;
1150 font-weight: bold;
1151 transition: left .5s;
1152 font-size: 1.2em;
1153 border: 1px solid;
1154 border-left: 0;
1155}
1156#source-sidebar {
1157 position: fixed;
1158 top: 0;
1159 bottom: 0;
1160 left: 0;
1161 width: 300px;
1162 z-index: 1;
1163 overflow: auto;
1164 transition: left .5s;
1165 border-right: 1px solid;
1166}
1167#source-sidebar > .title {
1168 font-size: 1.5em;
1169 text-align: center;
1170 border-bottom: 1px solid;
1171 margin-bottom: 6px;
1172}
1173
1174.theme-picker {
1175 position: absolute;
1176 left: 211px;
1177 top: 19px;
1178}
1179
1180.theme-picker button {
1181 outline: none;
1182}
1183
1184#settings-menu {
1185 position: absolute;
1186 right: 0;
1187 top: 10px;
1188 outline: none;
1189}
1190
1191#theme-picker, #settings-menu {
1192 padding: 4px;
1193 width: 27px;
1194 height: 29px;
1195 border: 1px solid;
1196 border-radius: 3px;
1197 cursor: pointer;
1198}
1199
1200#theme-choices {
1201 display: none;
1202 position: absolute;
1203 left: 0;
1204 top: 28px;
1205 border: 1px solid;
1206 border-radius: 3px;
1207 z-index: 1;
1208 cursor: pointer;
1209}
1210
1211#theme-choices > button {
1212 border: none;
1213 width: 100%;
1214 padding: 4px;
1215 text-align: center;
1216 background: rgba(0,0,0,0);
1217}
1218
1219#theme-choices > button:not(:first-child) {
1220 border-top: 1px solid;
1221}
1222
1a4d82fc
JJ
1223/* Media Queries */
1224
1225@media (max-width: 700px) {
476ff2be
SL
1226 body {
1227 padding-top: 0px;
1228 }
1229
a1dfa0c6 1230 .rustdoc > .sidebar {
abe05a73 1231 height: 45px;
476ff2be 1232 min-height: 40px;
abe05a73
XL
1233 margin: 0;
1234 margin-left: -15px;
1235 padding: 0 15px;
476ff2be 1236 position: static;
0731742a 1237 z-index: 11;
476ff2be
SL
1238 }
1239
ff7c6d11 1240 .sidebar > .location {
476ff2be
SL
1241 float: right;
1242 margin: 0px;
abe05a73 1243 margin-top: 2px;
476ff2be
SL
1244 padding: 3px 10px 1px 10px;
1245 min-height: 39px;
1246 background: inherit;
1247 text-align: left;
1248 font-size: 24px;
1249 }
1250
1251 .sidebar .location:empty {
1252 padding: 0;
1253 }
1254
48663c56 1255 .sidebar .logo-container {
476ff2be 1256 width: 35px;
48663c56 1257 height: 35px;
476ff2be 1258 margin-top: 5px;
abe05a73 1259 margin-bottom: 5px;
476ff2be 1260 float: left;
ff7c6d11 1261 margin-left: 50px;
476ff2be
SL
1262 }
1263
48663c56
XL
1264 .sidebar .logo-container > img {
1265 max-width: 35px;
1266 max-height: 35px;
1267 }
1268
ff7c6d11
XL
1269 .sidebar-menu {
1270 position: fixed;
1271 z-index: 10;
1272 font-size: 2rem;
1273 cursor: pointer;
1274 width: 45px;
1275 left: 0;
1276 text-align: center;
1277 display: block;
1278 border-bottom: 1px solid;
1279 border-right: 1px solid;
2c00a5a8 1280 height: 45px;
476ff2be
SL
1281 }
1282
48663c56
XL
1283 .rustdoc.source > .sidebar > .sidebar-menu {
1284 display: none;
1285 }
1286
ff7c6d11
XL
1287 .sidebar-elems {
1288 position: fixed;
1289 z-index: 1;
1290 left: 0;
1291 top: 45px;
1292 bottom: 0;
1293 overflow-y: auto;
1294 border-right: 1px solid;
476ff2be
SL
1295 display: none;
1296 }
1297
ff7c6d11
XL
1298 .sidebar > .block.version {
1299 border-bottom: none;
1300 margin-top: 12px;
1301 }
1302
1303 nav.sub {
2c00a5a8
XL
1304 width: calc(100% - 32px);
1305 float: right;
ff7c6d11
XL
1306 }
1307
476ff2be
SL
1308 .content {
1309 margin-left: 0px;
1310 }
1311
2c00a5a8
XL
1312 #main {
1313 margin-top: 45px;
1314 padding: 0;
1315 }
1316
476ff2be
SL
1317 .content .in-band {
1318 width: 100%;
1319 }
1320
abe05a73
XL
1321 .content h4 > .out-of-band {
1322 position: inherit;
476ff2be
SL
1323 }
1324
1325 .toggle-wrapper > .collapse-toggle {
1326 left: 0px;
1327 }
1328
1329 .toggle-wrapper {
1330 height: 1.5em;
1331 }
abe05a73
XL
1332
1333 #search {
1334 margin-left: 0;
1335 }
1336
1337 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1338 display: flex;
1339 }
0531ce1d
XL
1340
1341 .anchor {
1342 display: none !important;
1343 }
0bf4aa26
XL
1344
1345 h1.fqn {
1346 overflow: initial;
1347 }
1a4d82fc 1348
48663c56
XL
1349 .theme-picker {
1350 left: 10px;
1351 top: 54px;
1352 z-index: 1;
476ff2be 1353 }
ea8adc8c 1354
ff7c6d11
XL
1355 h4 > .important-traits {
1356 position: absolute;
1357 left: -22px;
1358 top: 24px;
1359 }
1360
1361 #titles > div > div.count {
1362 float: left;
1363 width: 100%;
1364 }
1365
1366 #titles {
1367 height: 50px;
1368 }
1369
1370 .sidebar.mobile {
1371 position: fixed;
1372 width: 100%;
1373 margin-left: 0;
1374 background-color: rgba(0,0,0,0);
1375 height: 100%;
1376 }
0bf4aa26
XL
1377 .sidebar {
1378 width: calc(100% + 30px);
1379 }
ff7c6d11
XL
1380
1381 .show-it {
1382 display: block;
2c00a5a8
XL
1383 width: 246px;
1384 }
1385
1386 .show-it > .block.items {
1387 margin: 8px 0;
1388 }
1389
1390 .show-it > .block.items > ul {
1391 margin: 0;
1392 }
1393
1394 .show-it > .block.items > ul > li {
1395 text-align: center;
1396 margin: 2px 0;
1397 }
1398
1399 .show-it > .block.items > ul > li > a {
1400 font-size: 21px;
ff7c6d11
XL
1401 }
1402
1403 /* Because of ios, we need to actually have a full height sidebar title so the
1404 * actual sidebar can show up. But then we need to make it transparent so we don't
1405 * hide content. The filler just allows to create the background for the sidebar
1406 * title. But because of the absolute position, I had to lower the z-index.
1407 */
1408 #sidebar-filler {
1409 position: fixed;
1410 left: 45px;
1411 width: calc(100% - 45px);
1412 top: 0;
1413 height: 45px;
1414 z-index: -1;
1415 border-bottom: 1px solid;
1416 }
0531ce1d
XL
1417
1418 .collapse-toggle {
1419 left: -20px;
1420 }
1421
1422 .impl > .collapse-toggle {
1423 left: -10px;
1424 }
0bf4aa26
XL
1425
1426 #all-types {
1427 margin: 10px;
1428 }
48663c56
XL
1429
1430 #sidebar-toggle {
1431 top: 100px;
1432 width: 30px;
1433 font-size: 1.5rem;
1434 text-align: center;
1435 padding: 0;
1436 }
1437
1438 #source-sidebar {
1439 z-index: 11;
1440 }
1441
1442 #main > .line-numbers {
1443 margin-top: 0;
1444 }
ff7c6d11
XL
1445}
1446
48663c56
XL
1447@media print {
1448 nav.sub, .content .out-of-band, .collapse-toggle {
1449 display: none;
1450 }
1451}
ff7c6d11
XL
1452
1453@media (max-width: 416px) {
1454 #titles {
1455 height: 73px;
1456 }
1457
1458 #titles > div {
1459 height: 73px;
1460 }
1461}
1462
1463.modal {
1464 position: fixed;
1465 width: 100vw;
1466 height: 100vh;
1467 z-index: 10000;
1468 top: 0;
1469 left: 0;
1470}
1471
1472.modal-content {
1473 display: block;
1474 max-width: 60%;
1475 min-width: 200px;
1476 padding: 8px;
1477 top: 40%;
1478 position: absolute;
1479 left: 50%;
1480 transform: translate(-50%, -40%);
1481 border: 1px solid;
1482 border-radius: 4px;
1483 border-top-right-radius: 0;
1484}
1485
1486.modal-content > .docblock {
1487 margin: 0;
1488}
1489
1490h3.important {
1491 margin: 0;
1492 margin-bottom: 13px;
1493 font-size: 19px;
1494}
1495
1496.modal-content > .docblock > code.content {
1497 margin: 0;
1498 padding: 0;
1499 font-size: 20px;
1500}
1501
1502.modal-content > .close {
1503 position: absolute;
1504 font-weight: 900;
1505 right: -25px;
1506 top: -1px;
1507 font-size: 18px;
1508 width: 25px;
1509 padding-right: 2px;
1510 border-top-right-radius: 5px;
1511 border-bottom-right-radius: 5px;
1512 text-align: center;
1513 border: 1px solid;
1514 border-right: 0;
1515 cursor: pointer;
1516}
1517
1518.modal-content > .whiter {
1519 height: 25px;
1520 position: absolute;
1521 width: 3px;
1522 right: -2px;
1523 top: 0px;
1524}
1525
1526#main > div.important-traits {
1527 position: absolute;
1528 left: -24px;
1529 margin-top: 16px;
1530}
1531
0731742a 1532.content > .methods > .method > div.important-traits {
ff7c6d11 1533 position: absolute;
0731742a 1534 font-weight: 400;
ff7c6d11
XL
1535 left: -42px;
1536 margin-top: 2px;
1537}
2c00a5a8
XL
1538
1539kbd {
1540 display: inline-block;
1541 padding: 3px 5px;
a1dfa0c6 1542 font: 15px monospace;
2c00a5a8
XL
1543 line-height: 10px;
1544 vertical-align: middle;
1545 border: solid 1px;
1546 border-radius: 3px;
1547 box-shadow: inset 0 -1px 0;
1548 cursor: default;
1549}
1550
0531ce1d
XL
1551.hidden-by-impl-hider,
1552.hidden-by-usual-hider {
1553 /* important because of conflicting rule for small screens */
1554 display: none !important;
1555}
1556
1557#implementations-list > h3 > span.in-band {
1558 width: 100%;
1559}
1560
1561.table-display {
1562 width: 100%;
1563 border: 0;
1564 border-collapse: collapse;
1565 border-spacing: 0;
1566 font-size: 16px;
1567}
1568
1569.table-display tr td:first-child {
1570 padding-right: 0;
1571}
1572
1573.table-display tr td:last-child {
1574 float: right;
1575}
1576.table-display .out-of-band {
1577 position: relative;
1578 font-size: 19px;
1579 display: block;
1580}
b7449926
XL
1581#implementors-list > .impl-items .table-display .out-of-band {
1582 font-size: 17px;
1583}
1584
1585.table-display td:hover .anchor {
1586 display: block;
1587 top: 2px;
1588 left: -5px;
1589}
83c7162d
XL
1590
1591#main > ul {
1592 padding-left: 10px;
1593}
1594#main > ul > li {
1595 list-style: none;
1596}
8faf50e0
XL
1597
1598.non-exhaustive {
1599 margin-bottom: 1em;
1600}
a1dfa0c6 1601
a1dfa0c6
XL
1602div.children {
1603 padding-left: 27px;
1604 display: none;
1605}
1606div.name {
1607 cursor: pointer;
1608 position: relative;
1609 margin-left: 16px;
1610}
1611div.files > a {
1612 display: block;
1613 padding: 0 3px;
1614}
1615div.files > a:hover, div.name:hover {
1616 background-color: #a14b4b;
1617}
1618div.name.expand + .children {
1619 display: block;
1620}
1621div.name::before {
1622 content: "\25B6";
1623 padding-left: 4px;
1624 font-size: 0.7em;
1625 position: absolute;
1626 left: -16px;
1627 top: 4px;
1628}
1629div.name.expand::before {
1630 transform: rotate(90deg);
9fa01778
XL
1631 left: -15px;
1632 top: 2px;
a1dfa0c6 1633}
48663c56
XL
1634
1635/* This part is to fix the "Expand attributes" part in the type declaration. */
1636.type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1637 margin-left: 0 !important;
1638}
1639.type-decl > pre > .docblock.attributes.top-attr {
1640 margin-left: 1.8em !important;
1641}
1642.type-decl > pre > .toggle-attributes {
1643 margin-left: 2.2em;
1644}
1645.type-decl > pre > .docblock.attributes {
1646 margin-left: 4em;
1647}