]> git.proxmox.com Git - rustc.git/blame - src/librustdoc/html/static/css/rustdoc.css
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / librustdoc / html / static / css / 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;
6a06907d
XL
6 src: local('Fira Sans'),
7 url("FiraSans-Regular.woff2") format("woff2"),
8 url("FiraSans-Regular.woff") format('woff');
9 font-display: swap;
1a4d82fc
JJ
10}
11@font-face {
476ff2be
SL
12 font-family: 'Fira Sans';
13 font-style: normal;
14 font-weight: 500;
6a06907d
XL
15 src: local('Fira Sans Medium'),
16 url("FiraSans-Medium.woff2") format("woff2"),
17 url("FiraSans-Medium.woff") format('woff');
18 font-display: swap;
1a4d82fc 19}
b039eaaf 20
cdc7bbd5 21/* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */
1a4d82fc 22@font-face {
cdc7bbd5 23 font-family: 'Source Serif 4';
476ff2be
SL
24 font-style: normal;
25 font-weight: 400;
136023e0
XL
26 src: local('Source Serif 4'),
27 url("SourceSerif4-Regular.ttf.woff2") format("woff2"),
28 url("SourceSerif4-Regular.ttf.woff") format("woff");
6a06907d 29 font-display: swap;
1a4d82fc
JJ
30}
31@font-face {
cdc7bbd5 32 font-family: 'Source Serif 4';
476ff2be
SL
33 font-style: italic;
34 font-weight: 400;
136023e0
XL
35 src: local('Source Serif 4 Italic'),
36 url("SourceSerif4-It.ttf.woff2") format("woff2"),
37 url("SourceSerif4-It.ttf.woff") format("woff");
6a06907d 38 font-display: swap;
1a4d82fc
JJ
39}
40@font-face {
cdc7bbd5 41 font-family: 'Source Serif 4';
476ff2be
SL
42 font-style: normal;
43 font-weight: 700;
136023e0
XL
44 src: local('Source Serif 4 Bold'),
45 url("SourceSerif4-Bold.ttf.woff2") format("woff2"),
46 url("SourceSerif4-Bold.ttf.woff") format("woff");
6a06907d 47 font-display: swap;
1a4d82fc 48}
b039eaaf
SL
49
50/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
1a4d82fc 51@font-face {
476ff2be
SL
52 font-family: 'Source Code Pro';
53 font-style: normal;
54 font-weight: 400;
55 /* Avoid using locally installed font because bad versions are in circulation:
56 * see https://github.com/rust-lang/rust/issues/24355 */
136023e0
XL
57 src: url("SourceCodePro-Regular.ttf.woff2") format("woff2"),
58 url("SourceCodePro-Regular.ttf.woff") format("woff");
cdc7bbd5
XL
59 font-display: swap;
60}
61@font-face {
62 font-family: 'Source Code Pro';
63 font-style: italic;
64 font-weight: 400;
136023e0
XL
65 src: url("SourceCodePro-It.ttf.woff2") format("woff2"),
66 url("SourceCodePro-It.ttf.woff") format("woff");
6a06907d 67 font-display: swap;
1a4d82fc
JJ
68}
69@font-face {
476ff2be
SL
70 font-family: 'Source Code Pro';
71 font-style: normal;
72 font-weight: 600;
136023e0
XL
73 src: url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),
74 url("SourceCodePro-Semibold.ttf.woff") format("woff");
6a06907d 75 font-display: swap;
1a4d82fc
JJ
76}
77
17df50a5
XL
78/* Avoid using legacy CJK serif fonts in Windows like Batang */
79@font-face {
80 font-family: 'Noto Sans KR';
81 src: url("noto-sans-kr-v13-korean-regular.woff") format("woff");
82 font-display: swap;
83 unicode-range: U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF;
84}
85
1a4d82fc 86* {
3dfed10e
XL
87 -webkit-box-sizing: border-box;
88 -moz-box-sizing: border-box;
89 box-sizing: border-box;
1a4d82fc
JJ
90}
91
e1599b0c
XL
92/* This part handles the "default" theme being used depending on the system one. */
93html {
94 content: "";
95}
96@media (prefers-color-scheme: light) {
97 html {
98 content: "light";
99 }
100}
101@media (prefers-color-scheme: dark) {
102 html {
103 content: "dark";
104 }
105}
106
1a4d82fc
JJ
107/* General structure and fonts */
108
109body {
17df50a5 110 font: 16px/1.4 "Source Serif 4", "Noto Sans KR", serif;
476ff2be
SL
111 margin: 0;
112 position: relative;
113 padding: 10px 15px 20px 15px;
1a4d82fc 114
476ff2be
SL
115 -webkit-font-feature-settings: "kern", "liga";
116 -moz-font-feature-settings: "kern", "liga";
117 font-feature-settings: "kern", "liga";
1a4d82fc
JJ
118}
119
120h1 {
476ff2be 121 font-size: 1.5em;
1a4d82fc
JJ
122}
123h2 {
476ff2be 124 font-size: 1.4em;
1a4d82fc
JJ
125}
126h3 {
476ff2be 127 font-size: 1.3em;
1a4d82fc 128}
17df50a5 129h1, h2, h3, h4 {
476ff2be
SL
130 font-weight: 500;
131 margin: 20px 0 15px 0;
132 padding-bottom: 6px;
1a4d82fc
JJ
133}
134h1.fqn {
cdc7bbd5 135 display: flex;
476ff2be
SL
136 border-bottom: 1px dashed;
137 margin-top: 0;
cdc7bbd5
XL
138
139 /* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
140 above the h1 */
141 padding-left: 1px;
1a4d82fc 142}
f035d41b
XL
143h1.fqn > .in-band > a:hover {
144 text-decoration: underline;
145}
136023e0 146h2, h3, h4 {
476ff2be 147 border-bottom: 1px solid;
1a4d82fc 148}
17df50a5
XL
149h3.code-header, h4.code-header {
150 font-size: 1em;
151 font-weight: 600;
152 border: none;
153 padding: 0;
154 margin: 0;
155}
156.impl,
157.impl-items .method,
158.methods .method,
159.impl-items .type,
160.methods .type,
161.impl-items .associatedconstant,
162.methods .associatedconstant,
163.impl-items .associatedtype,
164.methods .associatedtype {
0731742a 165 flex-basis: 100%;
476ff2be 166 font-weight: 600;
0731742a 167 margin-top: 16px;
476ff2be
SL
168 margin-bottom: 10px;
169 position: relative;
1a4d82fc 170}
17df50a5
XL
171.impl, .method.trait-impl,
172.type.trait-impl,
173.associatedconstant.trait-impl,
174.associatedtype.trait-impl {
0531ce1d 175 padding-left: 15px;
1a4d82fc 176}
ea8adc8c 177
17df50a5
XL
178div.impl-items > div {
179 padding-left: 0;
180}
181
ea8adc8c 182h1, h2, h3, h4,
17df50a5
XL
183.sidebar, a.source, .search-input, .search-results .result-name,
184.content table td:first-child > a,
136023e0 185.item-left > a,
17df50a5 186div.item-list .out-of-band, span.since,
5869c6ff 187#source-sidebar, #sidebar-toggle,
17df50a5
XL
188details.rustdoc-toggle > summary::before,
189details.undocumented > summary::before,
190div.impl-items > div:not(.docblock):not(.item-info),
191.content ul.crate a.crate, a.srclink,
5869c6ff
XL
192/* This selector is for the items listed in the "all items" page. */
193#main > ul.docblock > li > a {
6a06907d 194 font-family: "Fira Sans", Arial, sans-serif;
1a4d82fc
JJ
195}
196
1b1a35ee 197.content ul.crate a.crate {
6a06907d 198 font-size: 16px/1.6;
1b1a35ee
XL
199}
200
1a4d82fc 201ol, ul {
476ff2be 202 padding-left: 25px;
1a4d82fc
JJ
203}
204ul ul, ol ul, ul ol, ol ol {
a1dfa0c6 205 margin-bottom: .6em;
1a4d82fc
JJ
206}
207
208p {
476ff2be 209 margin: 0 0 .6em 0;
1a4d82fc
JJ
210}
211
3b2f2976
XL
212summary {
213 outline: none;
214}
215
17df50a5
XL
216/* Fix some style changes due to normalize.css 8 */
217
218td,
219th {
220 padding: 0;
221}
222
223table {
224 border-collapse: collapse;
225}
226
227button,
228input,
229optgroup,
230select,
231textarea {
232 color: inherit;
233 font: inherit;
234 margin: 0;
235}
236
237/* end tweaks for normalize.css 8 */
238
239details:not(.rustdoc-toggle) summary {
240 margin-bottom: .6em;
241}
242
243code, pre, a.test-arrow, .code-header {
a1dfa0c6 244 font-family: "Source Code Pro", monospace;
1a4d82fc 245}
9e0c209e 246.docblock code, .docblock-short code {
476ff2be 247 border-radius: 3px;
0bf4aa26 248 padding: 0 0.1em;
1a4d82fc 249}
cdc7bbd5 250.docblock pre code, .docblock-short pre code {
476ff2be 251 padding: 0;
c1a9b12d 252}
1a4d82fc 253pre {
476ff2be 254 padding: 14px;
1a4d82fc 255}
136023e0
XL
256.type-decl pre {
257 overflow-x: auto;
258}
1a4d82fc 259
8bb4bdeb 260.source .content pre {
476ff2be 261 padding: 20px;
1a4d82fc
JJ
262}
263
9cc50fc6 264img {
476ff2be 265 max-width: 100%;
9cc50fc6
SL
266}
267
416331ca
XL
268li {
269 position: relative;
270}
271
8bb4bdeb 272.source .content {
476ff2be
SL
273 margin-top: 50px;
274 max-width: none;
275 overflow: visible;
276 margin-left: 0px;
1a4d82fc
JJ
277}
278
279nav.sub {
476ff2be
SL
280 font-size: 16px;
281 text-transform: uppercase;
1a4d82fc
JJ
282}
283
284.sidebar {
476ff2be 285 width: 200px;
abe05a73 286 position: fixed;
476ff2be
SL
287 left: 0;
288 top: 0;
e74abb32 289 bottom: 0;
abe05a73 290 overflow: auto;
8bb4bdeb
XL
291}
292
ba9703b0
XL
293/* Improve the scrollbar display on firefox */
294* {
295 scrollbar-width: initial;
296}
297.sidebar {
298 scrollbar-width: thin;
299}
300
301/* Improve the scrollbar display on webkit-based browsers */
302::-webkit-scrollbar {
303 width: 12px;
304}
305.sidebar::-webkit-scrollbar {
306 width: 8px;
307}
308::-webkit-scrollbar-track {
309 -webkit-box-shadow: inset 0;
310}
311
2c00a5a8 312.sidebar .block > ul > li {
0531ce1d 313 margin-right: -10px;
1a4d82fc
JJ
314}
315
2c00a5a8
XL
316.content, nav {
317 max-width: 960px;
318}
1a4d82fc
JJ
319
320/* Everything else */
321
60c5eb7d 322.hidden {
2c00a5a8
XL
323 display: none !important;
324}
1a4d82fc 325
48663c56
XL
326.logo-container {
327 height: 100px;
328 width: 100px;
329 position: relative;
476ff2be
SL
330 margin: 20px auto;
331 display: block;
abe05a73 332 margin-top: 10px;
1a4d82fc
JJ
333}
334
48663c56
XL
335.logo-container > img {
336 max-width: 100px;
337 max-height: 100px;
136023e0 338 height: 100%;
48663c56
XL
339 position: absolute;
340 left: 50%;
341 top: 50%;
342 transform: translate(-50%, -50%);
343 display: block;
344}
345
1a4d82fc 346.sidebar .location {
8bb4bdeb 347 border: 1px solid;
476ff2be 348 font-size: 17px;
abe05a73 349 margin: 30px 10px 20px 10px;
476ff2be 350 text-align: center;
7cac9316 351 word-wrap: break-word;
17df50a5
XL
352 font-weight: inherit;
353 padding: 0;
1a4d82fc
JJ
354}
355
abe05a73
XL
356.sidebar .version {
357 font-size: 15px;
358 text-align: center;
ff7c6d11 359 border-bottom: 1px solid;
abe05a73
XL
360 overflow-wrap: break-word;
361 word-wrap: break-word; /* deprecated */
362 word-break: break-word; /* Chrome, non-standard */
363}
364
8bb4bdeb
XL
365.location:empty {
366 border: none;
367}
368
17df50a5 369.location a:first-of-type {
2c00a5a8
XL
370 font-weight: 500;
371}
17df50a5
XL
372.location a:hover {
373 text-decoration: underline;
374}
1a4d82fc
JJ
375
376.block {
abe05a73 377 padding: 0;
476ff2be 378 margin-bottom: 14px;
1a4d82fc 379}
e9174d1e 380.block h2, .block h3 {
476ff2be 381 text-align: center;
1a4d82fc 382}
e9174d1e 383.block ul, .block li {
abe05a73 384 margin: 0 10px;
476ff2be
SL
385 padding: 0;
386 list-style: none;
e9174d1e 387}
1a4d82fc
JJ
388
389.block a {
476ff2be
SL
390 display: block;
391 text-overflow: ellipsis;
392 overflow: hidden;
393 line-height: 15px;
394 padding: 7px 5px;
395 font-size: 14px;
396 font-weight: 300;
397 transition: border 500ms ease-out;
1a4d82fc
JJ
398}
399
abe05a73 400.sidebar-title {
ff7c6d11
XL
401 border-top: 1px solid;
402 border-bottom: 1px solid;
abe05a73
XL
403 text-align: center;
404 font-size: 17px;
405 margin-bottom: 5px;
17df50a5
XL
406 font-weight: inherit;
407 padding: 0;
abe05a73
XL
408}
409
410.sidebar-links {
411 margin-bottom: 15px;
412}
413
414.sidebar-links > a {
415 padding-left: 10px;
416 width: 100%;
417}
418
ff7c6d11
XL
419.sidebar-menu {
420 display: none;
421}
422
1a4d82fc 423.content {
476ff2be 424 padding: 15px 0;
1a4d82fc
JJ
425}
426
8bb4bdeb 427.source .content pre.rust {
476ff2be
SL
428 white-space: pre;
429 overflow: auto;
430 padding-left: 0;
1a4d82fc 431}
ff7c6d11 432
17df50a5 433.rustdoc .example-wrap {
a1dfa0c6
XL
434 display: inline-flex;
435 margin-bottom: 10px;
436}
437
438.example-wrap {
6a06907d 439 position: relative;
a1dfa0c6
XL
440 width: 100%;
441}
442
443.example-wrap > pre.line-number {
444 overflow: initial;
445 border: 1px solid;
a1dfa0c6
XL
446 padding: 13px 8px;
447 text-align: right;
17df50a5
XL
448 border-top-left-radius: 5px;
449 border-bottom-left-radius: 5px;
a1dfa0c6
XL
450}
451
94222f64
XL
452.example-wrap > pre.rust a:hover {
453 text-decoration: underline;
454}
455
136023e0 456.rustdoc:not(.source) .example-wrap > pre:not(.line-number) {
a1dfa0c6 457 width: 100%;
0731742a 458 overflow-x: auto;
a1dfa0c6
XL
459}
460
17df50a5 461.rustdoc .example-wrap > pre {
a1dfa0c6
XL
462 margin: 0;
463}
464
7cac9316
XL
465#search {
466 margin-left: 230px;
ff7c6d11
XL
467 position: relative;
468}
469
0531ce1d
XL
470#results > table {
471 width: 100%;
472 table-layout: fixed;
473}
474
17df50a5 475.content > .example-wrap pre.line-numbers {
476ff2be 476 position: relative;
476ff2be
SL
477 -webkit-user-select: none;
478 -moz-user-select: none;
479 -ms-user-select: none;
480 user-select: none;
1a4d82fc 481}
2c00a5a8
XL
482.line-numbers span {
483 cursor: pointer;
484}
1a4d82fc 485
29967ef6
XL
486.docblock-short {
487 overflow-wrap: anywhere;
488}
9e0c209e 489.docblock-short p {
476ff2be 490 display: inline;
d9579d0f
AL
491}
492
9e0c209e 493.docblock-short p {
476ff2be
SL
494 overflow: hidden;
495 text-overflow: ellipsis;
496 margin: 0;
1a4d82fc 497}
cdc7bbd5
XL
498/* Wrap non-pre code blocks (`text`) but not (```text```). */
499.docblock > :not(pre) > code,
500.docblock-short > :not(pre) > code {
48663c56 501 white-space: pre-wrap;
2c00a5a8 502}
1a4d82fc
JJ
503
504.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
476ff2be 505 border-bottom: 1px solid;
1a4d82fc
JJ
506}
507
17df50a5
XL
508.top-doc .docblock h1 { font-size: 1.3em; }
509.top-doc .docblock h2 { font-size: 1.15em; }
510.top-doc .docblock h3,
511.top-doc .docblock h4,
512.top-doc .docblock h5 {
513 font-size: 1em;
0731742a
XL
514}
515
3b2f2976
XL
516.docblock h1 { font-size: 1em; }
517.docblock h2 { font-size: 0.95em; }
518.docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
1a4d82fc 519
3157f602 520.docblock {
476ff2be 521 margin-left: 24px;
ea8adc8c 522 position: relative;
3157f602
XL
523}
524
1a4d82fc 525.content .out-of-band {
cdc7bbd5
XL
526 flex-grow: 0;
527 text-align: right;
476ff2be
SL
528 font-size: 23px;
529 margin: 0px;
cdc7bbd5 530 padding: 0 0 0 12px;
476ff2be 531 font-weight: normal;
a7813a04
XL
532}
533
17df50a5 534.method > .code-header, .trait-impl > .code-header, .invisible > .code-header {
2c00a5a8
XL
535 max-width: calc(100% - 41px);
536 display: block;
a7813a04
XL
537}
538
9e0c209e 539.invisible {
476ff2be
SL
540 width: 100%;
541 display: inline-block;
9e0c209e
SL
542}
543
1a4d82fc 544.content .in-band {
cdc7bbd5 545 flex-grow: 1;
476ff2be
SL
546 margin: 0px;
547 padding: 0px;
1a4d82fc
JJ
548}
549
17df50a5 550.in-band > code, .in-band > .code-header {
ea8adc8c
XL
551 display: inline-block;
552}
553
2c00a5a8
XL
554#main {
555 position: relative;
556}
a7813a04 557#main > .since {
476ff2be 558 top: inherit;
6a06907d 559 font-family: "Fira Sans", Arial, sans-serif;
a7813a04
XL
560}
561
0531ce1d 562.content table:not(.table-display) {
476ff2be 563 border-spacing: 0 5px;
1a4d82fc
JJ
564}
565.content td { vertical-align: top; }
566.content td:first-child { padding-right: 20px; }
567.content td p:first-child { margin-top: 0; }
568.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
8faf50e0 569.content tr:first-child td { border-top: 0; }
1a4d82fc 570
85aaf69f 571.docblock table {
476ff2be 572 margin: .5em 0;
9fa01778 573 width: calc(100% - 2px);
136023e0
XL
574 overflow-x: auto;
575 display: block;
85aaf69f
SL
576}
577
578.docblock table td {
476ff2be 579 padding: .5em;
8faf50e0 580 border: 1px dashed;
85aaf69f
SL
581}
582
583.docblock table th {
476ff2be
SL
584 padding: .5em;
585 text-align: left;
8faf50e0 586 border: 1px solid;
476ff2be
SL
587}
588
589.fields + table {
590 margin-bottom: 1em;
85aaf69f
SL
591}
592
1a4d82fc 593.content .item-list {
476ff2be
SL
594 list-style-type: none;
595 padding: 0;
1a4d82fc
JJ
596}
597
1a4d82fc 598.content .multi-column {
476ff2be
SL
599 -moz-column-count: 5;
600 -moz-column-gap: 2.5em;
601 -webkit-column-count: 5;
602 -webkit-column-gap: 2.5em;
603 column-count: 5;
604 column-gap: 2.5em;
1a4d82fc
JJ
605}
606.content .multi-column li { width: 100%; display: inline-block; }
607
17df50a5 608.content > .methods > .method {
476ff2be
SL
609 font-size: 1em;
610 position: relative;
1a4d82fc 611}
62682a34 612/* Shift "where ..." part of method or fn definition down a line */
476ff2be
SL
613.content .method .where,
614.content .fn .where,
615.content .where.fmt-newline {
8bb4bdeb 616 display: block;
7cac9316 617 font-size: 0.8em;
476ff2be 618}
1a4d82fc 619
17df50a5 620.content .methods > div:not(.notable-traits):not(.method) {
0531ce1d
XL
621 margin-left: 40px;
622 margin-bottom: 15px;
623}
1a4d82fc 624
94b46f34 625.content .docblock > .impl-items {
476ff2be 626 margin-left: 20px;
94b46f34
XL
627 margin-top: -34px;
628}
94b46f34
XL
629.content .docblock >.impl-items .table-display {
630 margin: 0;
631}
632.content .docblock >.impl-items table td {
633 padding: 0;
634}
94b46f34
XL
635.content .docblock > .impl-items .table-display, .impl-items table td {
636 border: none;
d9579d0f 637}
1a4d82fc 638
fc512014 639.content .item-info code {
476ff2be 640 font-size: 90%;
e9174d1e
SL
641}
642
fc512014 643.content .item-info {
b7449926
XL
644 position: relative;
645 margin-left: 33px;
b7449926
XL
646}
647
fc512014 648.sub-variant > div > .item-info {
a1dfa0c6
XL
649 margin-top: initial;
650}
651
fc512014 652.content .item-info::before {
dfeec247
XL
653 content: '⬑';
654 font-size: 25px;
b7449926 655 position: absolute;
136023e0 656 top: -6px;
dfeec247 657 left: -19px;
b7449926 658}
a1dfa0c6 659
17df50a5
XL
660.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant,
661.impl-items > .associatedtype, .content .impl-items details > summary > .type,
662.impl-items details > summary > .associatedconstant,
663.impl-items details > summary > .associatedtype {
a1dfa0c6
XL
664 margin-left: 20px;
665}
666
fc512014 667.content .impl-items .docblock, .content .impl-items .item-info {
a1dfa0c6
XL
668 margin-bottom: .6em;
669}
670
fc512014 671.content .impl-items > .item-info {
a1dfa0c6
XL
672 margin-left: 40px;
673}
674
fc512014 675.methods > .item-info, .content .impl-items > .item-info {
b7449926
XL
676 margin-top: -8px;
677}
678
0731742a
XL
679.impl-items {
680 flex-basis: 100%;
681}
682
fc512014 683#main > .item-info {
b7449926
XL
684 margin-top: 0;
685}
686
e74abb32 687nav:not(.sidebar) {
476ff2be
SL
688 border-bottom: 1px solid;
689 padding-bottom: 10px;
690 margin-bottom: 10px;
1a4d82fc
JJ
691}
692nav.main {
476ff2be
SL
693 padding: 20px 0;
694 text-align: center;
1a4d82fc
JJ
695}
696nav.main .current {
476ff2be
SL
697 border-top: 1px solid;
698 border-bottom: 1px solid;
1a4d82fc
JJ
699}
700nav.main .separator {
476ff2be
SL
701 border: 1px solid;
702 display: inline-block;
703 height: 23px;
704 margin: 0 20px;
1a4d82fc
JJ
705}
706nav.sum { text-align: right; }
707nav.sub form { display: inline; }
708
e9174d1e 709nav.sub, .content {
476ff2be 710 margin-left: 230px;
1a4d82fc
JJ
711}
712
713a {
476ff2be
SL
714 text-decoration: none;
715 background: transparent;
1a4d82fc 716}
c34b1796 717
136023e0
XL
718.small-section-header {
719 display: flex;
720 justify-content: space-between;
721 position: relative;
722}
723
3b2f2976
XL
724.small-section-header:hover > .anchor {
725 display: initial;
726}
727
cdc7bbd5 728.in-band:hover > .anchor, .impl:hover > .anchor, .method.trait-impl:hover > .anchor,
17df50a5
XL
729.type.trait-impl:hover > .anchor, .associatedconstant.trait-impl:hover > .anchor,
730.associatedtype.trait-impl:hover > .anchor {
ea8adc8c
XL
731 display: inline-block;
732 position: absolute;
3b2f2976
XL
733}
734.anchor {
735 display: none;
ea8adc8c 736 position: absolute;
94222f64
XL
737 left: 0;
738 background: none !important;
ea8adc8c
XL
739}
740.anchor.field {
0531ce1d
XL
741 left: -5px;
742}
743.small-section-header > .anchor {
94222f64
XL
744 left: -15px;
745 padding-right: 8px;
3b2f2976 746}
94222f64
XL
747h2.small-section-header > .anchor {
748 padding-right: 6px;
749}
750.anchor::before {
751 content: '§';
3b2f2976
XL
752}
753
94b46f34 754.docblock a:not(.srclink):not(.test-arrow):hover,
fc512014 755.docblock-short a:not(.srclink):not(.test-arrow):hover, .item-info a {
476ff2be 756 text-decoration: underline;
c34b1796 757}
1a4d82fc 758
17df50a5
XL
759.invisible > .srclink,
760.method > .code-header + .srclink {
b7449926
XL
761 position: absolute;
762 top: 0;
763 right: 0;
764 font-size: 17px;
765 font-weight: normal;
766}
767
e9174d1e 768.block a.current.crate { font-weight: 500; }
1a4d82fc 769
136023e0
XL
770.item-table {
771 display: grid;
772 column-gap: 1.2rem;
773 row-gap: 0.0rem;
774 grid-template-columns: auto 1fr;
775 /* align content left */
776 justify-items: start;
777}
778
779.item-left, .item-right {
780 display: block;
781}
782.item-left {
783 grid-column: 1;
784}
785.item-right {
786 grid-column: 2;
787}
788
83c7162d
XL
789.search-container {
790 position: relative;
791}
0731742a
XL
792.search-container > div {
793 display: inline-flex;
3dfed10e 794 width: calc(100% - 63px);
0731742a
XL
795}
796#crate-search {
6a06907d 797 min-width: 115px;
0731742a
XL
798 margin-top: 5px;
799 padding: 6px;
800 padding-right: 19px;
416331ca 801 flex: none;
0731742a
XL
802 border: 0;
803 border-right: 0;
804 border-radius: 4px 0 0 4px;
805 outline: none;
806 cursor: pointer;
807 border-right: 1px solid;
808 -moz-appearance: none;
809 -webkit-appearance: none;
810 /* Removes default arrow from firefox */
811 text-indent: 0.01px;
812 text-overflow: "";
813 background-repeat: no-repeat;
814 background-color: transparent;
815 background-size: 20px;
816 background-position: calc(100% - 1px) 56%;
817}
83c7162d
XL
818.search-container > .top-button {
819 position: absolute;
820 right: 0;
821 top: 10px;
822}
1a4d82fc 823.search-input {
476ff2be
SL
824 /* Override Normalize.css: we have margins and do
825 not want to overflow - the `moz` attribute is necessary
826 until Firefox 29, too early to drop at this point */
827 -moz-box-sizing: border-box !important;
828 box-sizing: border-box !important;
829 outline: none;
830 border: none;
831 border-radius: 1px;
832 margin-top: 5px;
833 padding: 10px 16px;
834 font-size: 17px;
835 transition: border-color 300ms ease;
836 transition: border-radius 300ms ease-in-out;
837 transition: box-shadow 300ms ease-in-out;
48663c56 838 width: 100%;
0731742a
XL
839}
840
841#crate-search + .search-input {
842 border-radius: 0 1px 1px 0;
48663c56 843 width: calc(100% - 32px);
1a4d82fc
JJ
844}
845
846.search-input:focus {
476ff2be
SL
847 border-radius: 2px;
848 border: 0;
849 outline: 0;
1a4d82fc
JJ
850}
851
17df50a5
XL
852.search-results {
853 display: none;
854 padding-bottom: 2em;
855}
856
857.search-results.active {
858 display: block;
859 /* prevent overhanging tabs from moving the first result */
860 clear: both;
861}
862
863.search-results .desc > span {
476ff2be
SL
864 white-space: nowrap;
865 text-overflow: ellipsis;
866 overflow: hidden;
867 display: block;
1a4d82fc
JJ
868}
869
17df50a5 870.search-results > a {
476ff2be 871 display: block;
17df50a5
XL
872 width: 100%;
873 /* A little margin ensures the browser's outlining of focused links has room to display. */
874 margin-left: 2px;
875 margin-right: 2px;
876 border-bottom: 1px solid #aaa3;
1a4d82fc
JJ
877}
878
17df50a5
XL
879.search-results > a > div {
880 display: flex;
881 flex-flow: row wrap;
0531ce1d 882}
1a4d82fc 883
17df50a5
XL
884.search-results .result-name, .search-results div.desc, .search-results .result-description {
885 width: 50%;
886}
887.search-results .result-name {
888 padding-right: 1em;
9e0c209e 889}
62682a34 890
17df50a5
XL
891.search-results .result-name > span {
892 display: inline-block;
893 margin: 0;
894 font-weight: normal;
94b46f34
XL
895}
896
c1a9b12d 897body.blur > :not(#help) {
476ff2be
SL
898 filter: blur(8px);
899 -webkit-filter: blur(8px);
900 opacity: .7;
c1a9b12d
SL
901}
902
1a4d82fc 903#help {
476ff2be
SL
904 width: 100%;
905 height: 100vh;
906 position: fixed;
907 top: 0;
908 left: 0;
909 display: flex;
910 justify-content: center;
911 align-items: center;
c1a9b12d
SL
912}
913#help > div {
476ff2be 914 flex: 0 0 auto;
476ff2be
SL
915 box-shadow: 0 0 6px rgba(0,0,0,.2);
916 width: 550px;
2c00a5a8 917 height: auto;
8bb4bdeb 918 border: 1px solid;
1a4d82fc 919}
1a4d82fc 920#help dt {
476ff2be 921 float: left;
476ff2be
SL
922 clear: left;
923 display: block;
5869c6ff 924 margin-right: 0.5rem;
1a4d82fc 925}
29967ef6
XL
926#help > div > span {
927 text-align: center;
928 display: block;
929 margin: 10px 0;
930 font-size: 18px;
931 border-bottom: 1px solid #ccc;
932 padding-bottom: 4px;
933 margin-bottom: 6px;
934}
abe05a73 935#help dd { margin: 5px 35px; }
1a4d82fc 936#help .infos { padding-left: 0; }
e9174d1e 937#help h1, #help h2 { margin-top: 0; }
c1a9b12d 938#help > div div {
476ff2be
SL
939 width: 50%;
940 float: left;
29967ef6 941 padding: 0 20px 20px 17px;;
1a4d82fc
JJ
942}
943
136023e0 944.item-info .stab {
32a655c1 945 display: table;
136023e0
XL
946}
947.stab {
476ff2be
SL
948 border-width: 1px;
949 border-style: solid;
950 padding: 3px;
951 margin-bottom: 5px;
952 font-size: 90%;
136023e0 953 font-weight: normal;
1a4d82fc 954}
32a655c1 955.stab p {
476ff2be 956 display: inline;
1a4d82fc
JJ
957}
958
0731742a 959.stab .emoji {
32a655c1
SL
960 font-size: 1.5em;
961}
962
cdc7bbd5
XL
963/* Black one-pixel outline around emoji shapes */
964.emoji {
965 text-shadow:
966 1px 0 0 black,
967 -1px 0 0 black,
968 0 1px 0 black,
969 0 -1px 0 black;
970}
971
972.module-item .stab,
973.import-item .stab {
9fa01778
XL
974 border-radius: 3px;
975 display: inline-block;
976 font-size: 80%;
977 line-height: 1.2;
978 margin-bottom: 0;
136023e0 979 margin-left: .3em;
9fa01778
XL
980 padding: 2px;
981 vertical-align: text-bottom;
1a4d82fc
JJ
982}
983
cdc7bbd5
XL
984.module-item.unstable,
985.import-item.unstable {
476ff2be 986 opacity: 0.65;
d9579d0f 987}
1a4d82fc 988
a7813a04 989.since {
476ff2be
SL
990 font-weight: normal;
991 font-size: initial;
7453a54e
SL
992}
993
fc512014 994.impl-items .since, .impl .since, .methods .since {
0731742a 995 padding-left: 12px;
136023e0 996 padding-right: 2px;
0731742a
XL
997 position: initial;
998}
999
fc512014 1000.impl-items .srclink, .impl .srclink, .methods .srclink {
0731742a
XL
1001 /* Override header settings otherwise it's too bold */
1002 font-size: 17px;
1003 font-weight: normal;
1004}
1005
136023e0
XL
1006.rightside {
1007 float: right;
0731742a
XL
1008}
1009
17df50a5 1010.has-srclink {
0731742a
XL
1011 font-size: 16px;
1012 margin-bottom: 12px;
1013 /* Push the src link out to the right edge consistently */
1014 justify-content: space-between;
1015}
1016
7453a54e 1017.variants_table {
476ff2be 1018 width: 100%;
7453a54e
SL
1019}
1020
1021.variants_table tbody tr td:first-child {
476ff2be 1022 width: 1%; /* make the variant name as small as possible */
7453a54e
SL
1023}
1024
c34b1796 1025td.summary-column {
476ff2be 1026 width: 100%;
c34b1796
AL
1027}
1028
1a4d82fc 1029.summary {
476ff2be 1030 padding-right: 0px;
1a4d82fc 1031}
1a4d82fc 1032
c30ab7b3 1033pre.rust .question-mark {
476ff2be 1034 font-weight: bold;
c30ab7b3 1035}
1a4d82fc 1036
b039eaaf 1037a.test-arrow {
476ff2be
SL
1038 display: inline-block;
1039 position: absolute;
1040 padding: 5px 10px 5px 10px;
1041 border-radius: 5px;
1042 font-size: 130%;
1043 top: 5px;
1044 right: 5px;
74b04a01 1045 z-index: 1;
1a4d82fc 1046}
9e0c209e 1047a.test-arrow:hover{
476ff2be 1048 text-decoration: none;
9e0c209e 1049}
1a4d82fc 1050
ea8adc8c
XL
1051.section-header:hover a:before {
1052 position: absolute;
1053 left: -25px;
b7449926 1054 padding-right: 10px; /* avoid gap that causes hover to disappear */
476ff2be 1055 content: '\2002\00a7\2002';
1a4d82fc
JJ
1056}
1057
c34b1796 1058.section-header:hover a {
476ff2be 1059 text-decoration: none;
c34b1796
AL
1060}
1061
1062.section-header a {
476ff2be 1063 color: inherit;
c34b1796
AL
1064}
1065
cdc7bbd5
XL
1066.code-attribute {
1067 font-weight: 300;
1068}
1069
a7813a04 1070.since + .srclink {
476ff2be 1071 padding-left: 10px;
a7813a04
XL
1072}
1073
041b39d2
XL
1074.item-spacer {
1075 width: 100%;
1076 height: 12px;
1077}
1078
48663c56 1079.out-of-band > span.since {
476ff2be
SL
1080 position: initial;
1081 font-size: 20px;
1082 margin-right: 5px;
a7813a04 1083}
1a4d82fc 1084
476ff2be 1085.sub-variant, .sub-variant > h3 {
cdc7bbd5
XL
1086 margin-top: 0px !important;
1087 padding-top: 1px;
a1dfa0c6
XL
1088}
1089
136023e0 1090#main .sub-variant > h3 {
a1dfa0c6
XL
1091 font-size: 15px;
1092 margin-left: 25px;
1093 margin-bottom: 5px;
1094}
1095
1096.sub-variant > div {
1097 margin-left: 20px;
1098 margin-bottom: 10px;
1099}
1100
1101.sub-variant > div > span {
1102 display: block;
1103 position: relative;
3157f602
XL
1104}
1105
ea8adc8c
XL
1106.toggle-label {
1107 display: inline-block;
1108 margin-left: 4px;
1109 margin-top: 3px;
1110}
1111
abe05a73
XL
1112.docblock > .section-header:first-child {
1113 margin-left: 15px;
1114 margin-top: 0;
1115}
1116
1117.docblock > .section-header:first-child:hover > a:before {
1118 left: -10px;
1119}
1120
17df50a5 1121:target > code, :target > .code-header {
8bb4bdeb 1122 opacity: 1;
a7813a04 1123}
1a4d82fc 1124
136023e0
XL
1125:target {
1126 padding-right: 3px;
1127}
1128
48663c56
XL
1129.information {
1130 position: absolute;
ba9703b0 1131 left: -25px;
48663c56
XL
1132 margin-top: 7px;
1133 z-index: 1;
1134}
1135
1136.tooltip {
1137 position: relative;
1138 display: inline-block;
1139 cursor: pointer;
1140}
1141
fc512014 1142.tooltip::after {
48663c56
XL
1143 display: none;
1144 text-align: center;
ba9703b0 1145 padding: 5px 3px 3px 3px;
48663c56
XL
1146 border-radius: 6px;
1147 margin-left: 5px;
ba9703b0 1148 font-size: 16px;
48663c56
XL
1149}
1150
fc512014
XL
1151.tooltip.ignore::after {
1152 content: "This example is not tested";
1153}
1154.tooltip.compile_fail::after {
1155 content: "This example deliberately fails to compile";
1156}
1157.tooltip.should_panic::after {
1158 content: "This example panics";
1159}
1160.tooltip.edition::after {
1161 content: "This code runs with edition " attr(data-edition);
1162}
1163
1164.tooltip::before {
48663c56
XL
1165 content: " ";
1166 position: absolute;
1167 top: 50%;
ba9703b0 1168 left: 16px;
48663c56
XL
1169 margin-top: -5px;
1170 border-width: 5px;
1171 border-style: solid;
fc512014 1172 display: none;
48663c56
XL
1173}
1174
fc512014 1175.tooltip:hover::before, .tooltip:hover::after {
29967ef6
XL
1176 display: inline;
1177}
1178
f035d41b 1179.tooltip.compile_fail, .tooltip.should_panic, .tooltip.ignore {
ba9703b0
XL
1180 font-weight: bold;
1181 font-size: 20px;
1182}
1183
3dfed10e
XL
1184.notable-traits-tooltip {
1185 display: inline-block;
1186 cursor: pointer;
1187}
1188
1189.notable-traits:hover .notable-traits-tooltiptext,
1190.notable-traits .notable-traits-tooltiptext.force-tooltip {
1191 display: inline-block;
1192}
1193
1194.notable-traits .notable-traits-tooltiptext {
1195 display: none;
1196 padding: 5px 3px 3px 3px;
1197 border-radius: 6px;
1198 margin-left: 5px;
1199 z-index: 10;
1200 font-size: 16px;
1201 cursor: default;
1202 position: absolute;
48663c56
XL
1203 border: 1px solid;
1204}
1205
3dfed10e
XL
1206.notable-traits-tooltip::after {
1207 /* The margin on the tooltip does not capture hover events,
1208 this extends the area of hover enough so that mouse hover is not
1209 lost when moving the mouse to the tooltip */
1210 content: "\00a0\00a0\00a0";
1211}
1212
1213.notable-traits .notable, .notable-traits .docblock {
1214 margin: 0;
1215}
1216
17df50a5
XL
1217.notable-traits .notable {
1218 margin: 0;
1219 margin-bottom: 13px;
1220 font-size: 19px;
1221 font-weight: 600;
1222}
1223
3dfed10e
XL
1224.notable-traits .docblock code.content{
1225 margin: 0;
1226 padding: 0;
1227 font-size: 20px;
1228}
1229
1230/* Example code has the "Run" button that needs to be positioned relative to the pre */
1231pre.rust.rust-example-rendered {
48663c56 1232 position: relative;
3dfed10e
XL
1233}
1234
1235pre.rust {
ba9703b0
XL
1236 tab-size: 4;
1237 -moz-tab-size: 4;
48663c56
XL
1238}
1239
1240.search-failed {
1241 text-align: center;
1242 margin-top: 20px;
17df50a5
XL
1243 display: none;
1244}
1245
1246.search-failed.active {
1247 display: block;
48663c56
XL
1248}
1249
1250.search-failed > ul {
1251 text-align: left;
1252 max-width: 570px;
1253 margin-left: auto;
1254 margin-right: auto;
1255}
1256
1257#titles {
1258 height: 35px;
1259}
1260
fc512014 1261#titles > button {
48663c56
XL
1262 float: left;
1263 width: 33.3%;
1264 text-align: center;
1265 font-size: 18px;
1266 cursor: pointer;
fc512014 1267 border: 0;
48663c56
XL
1268 border-top: 2px solid;
1269}
1270
fc512014 1271#titles > button:not(:last-child) {
48663c56
XL
1272 margin-right: 1px;
1273 width: calc(33.3% - 1px);
1274}
1275
fc512014 1276#titles > button > div.count {
48663c56
XL
1277 display: inline-block;
1278 font-size: 16px;
1279}
1280
3dfed10e
XL
1281.notable-traits {
1282 cursor: pointer;
1283 z-index: 2;
1284 margin-left: 5px;
1285}
1286
48663c56
XL
1287#all-types {
1288 text-align: center;
1289 border: 1px solid;
1290 margin: 0 10px;
1291 margin-bottom: 10px;
1292 display: block;
1293 border-radius: 7px;
1294}
1295#all-types > p {
1296 margin: 5px 0;
1297}
1298
1299#sidebar-toggle {
1300 position: fixed;
1301 top: 30px;
1302 left: 300px;
1303 z-index: 10;
1304 padding: 3px;
1305 border-top-right-radius: 3px;
1306 border-bottom-right-radius: 3px;
1307 cursor: pointer;
1308 font-weight: bold;
1309 transition: left .5s;
1310 font-size: 1.2em;
1311 border: 1px solid;
1312 border-left: 0;
1313}
1314#source-sidebar {
1315 position: fixed;
1316 top: 0;
1317 bottom: 0;
1318 left: 0;
1319 width: 300px;
1320 z-index: 1;
1321 overflow: auto;
1322 transition: left .5s;
1323 border-right: 1px solid;
1324}
1325#source-sidebar > .title {
1326 font-size: 1.5em;
1327 text-align: center;
1328 border-bottom: 1px solid;
1329 margin-bottom: 6px;
1330}
1331
1332.theme-picker {
1333 position: absolute;
1334 left: 211px;
1335 top: 19px;
1336}
1337
1338.theme-picker button {
1339 outline: none;
1340}
1341
17df50a5 1342#settings-menu, #help-button {
48663c56 1343 position: absolute;
48663c56 1344 top: 10px;
3dfed10e
XL
1345}
1346
1347#settings-menu {
1348 right: 0;
48663c56
XL
1349 outline: none;
1350}
1351
17df50a5 1352#theme-picker, #settings-menu, #help-button, #copy-path {
cdc7bbd5
XL
1353 padding: 4px;
1354 width: 27px;
1355 height: 29px;
1356 border: 1px solid;
1357 border-radius: 3px;
1358 cursor: pointer;
1359}
1360
17df50a5 1361#help-button {
3dfed10e 1362 right: 30px;
6a06907d 1363 font-family: "Fira Sans", Arial, sans-serif;
3dfed10e
XL
1364 text-align: center;
1365 font-size: 17px;
cdc7bbd5 1366 padding-top: 2px;
3dfed10e
XL
1367}
1368
cdc7bbd5 1369#copy-path {
17df50a5 1370 background: initial;
cdc7bbd5 1371 margin-left: 10px;
17df50a5
XL
1372 padding: 0;
1373 padding-left: 2px;
1374 border: 0;
48663c56
XL
1375}
1376
1377#theme-choices {
1378 display: none;
1379 position: absolute;
1380 left: 0;
1381 top: 28px;
1382 border: 1px solid;
1383 border-radius: 3px;
1384 z-index: 1;
1385 cursor: pointer;
1386}
1387
1388#theme-choices > button {
1389 border: none;
1390 width: 100%;
1b1a35ee 1391 padding: 4px 8px;
48663c56
XL
1392 text-align: center;
1393 background: rgba(0,0,0,0);
1394}
1395
1396#theme-choices > button:not(:first-child) {
1397 border-top: 1px solid;
1398}
1399
17df50a5
XL
1400kbd {
1401 display: inline-block;
1402 padding: 3px 5px;
1403 font: 15px monospace;
1404 line-height: 10px;
1405 vertical-align: middle;
1406 border: solid 1px;
1407 border-radius: 3px;
1408 box-shadow: inset 0 -1px 0;
1409 cursor: default;
1410}
1411
1412.hidden-by-impl-hider,
1413.hidden-by-usual-hider {
1414 /* important because of conflicting rule for small screens */
1415 display: none !important;
1416}
1417
1418#implementations-list > h3 > span.in-band {
1419 width: 100%;
1420}
1421
1422.table-display {
1423 width: 100%;
1424 border: 0;
1425 border-collapse: collapse;
1426 border-spacing: 0;
1427 font-size: 16px;
1428}
1429
1430.table-display tr td:first-child {
1431 padding-right: 0;
1432}
1433
1434.table-display tr td:last-child {
1435 float: right;
1436}
1437.table-display .out-of-band {
1438 position: relative;
1439 font-size: 19px;
1440 display: block;
1441}
1442#implementors-list > .impl-items .table-display .out-of-band {
1443 font-size: 17px;
1444}
1445
1446.table-display td:hover .anchor {
1447 display: block;
1448 top: 2px;
1449 left: -5px;
1450}
1451
1452#main > ul {
1453 padding-left: 10px;
1454}
1455#main > ul > li {
1456 list-style: none;
1457}
1458
1459.non-exhaustive {
1460 margin-bottom: 1em;
1461}
1462
1463div.children {
1464 padding-left: 27px;
1465 display: none;
1466}
1467div.name {
1468 cursor: pointer;
1469 position: relative;
1470 margin-left: 16px;
1471}
1472div.files > a {
1473 display: block;
1474 padding: 0 3px;
1475}
1476div.files > a:hover, div.name:hover {
1477 background-color: #a14b4b;
1478}
1479div.name.expand + .children {
1480 display: block;
1481}
1482div.name::before {
1483 content: "\25B6";
1484 padding-left: 4px;
1485 font-size: 0.7em;
1486 position: absolute;
1487 left: -16px;
1488 top: 4px;
1489}
1490div.name.expand::before {
1491 transform: rotate(90deg);
1492 left: -15px;
1493 top: 2px;
1494}
1495
1496/* The hideme class is used on summary tags that contain a span with
1497 placeholder text shown only when the toggle is closed. For instance,
1498 "Expand description" or "Show methods". */
1499details.rustdoc-toggle > summary.hideme {
1500 cursor: pointer;
1501}
1502
1503details.rustdoc-toggle > summary, details.undocumented > summary {
1504 list-style: none;
1505}
1506details.rustdoc-toggle > summary::-webkit-details-marker,
1507details.rustdoc-toggle > summary::marker,
1508details.undocumented > summary::-webkit-details-marker,
1509details.undocumented > summary::marker {
1510 display: none;
1511}
1512
1513details.rustdoc-toggle > summary.hideme > span {
1514 margin-left: 9px;
1515}
1516
1517details.rustdoc-toggle > summary::before {
94222f64 1518 content: "";
17df50a5 1519 cursor: pointer;
94222f64
XL
1520 width: 17px;
1521 height: max(17px, 1.1em);
1522 background-repeat: no-repeat;
1523 background-position: top left;
1524 display: inline-block;
1525 vertical-align: middle;
1526 opacity: .5;
1527}
1528
1529/* Screen readers see the text version at the end the line.
1530 Visual readers see the icon at the start of the line, but small and transparent. */
1531details.rustdoc-toggle > summary::after {
1532 content: "Expand";
1533 overflow: hidden;
1534 width: 0;
1535 height: 0;
1536 position: absolute;
1537}
1538
1539details.rustdoc-toggle > summary.hideme::after {
1540 /* "hideme" toggles already have a description when they're contracted */
1541 content: "";
1542}
1543
1544details.rustdoc-toggle > summary:focus::before,
1545details.rustdoc-toggle > summary:hover::before {
1546 opacity: 1;
17df50a5
XL
1547}
1548
1549details.rustdoc-toggle.top-doc > summary,
1550details.rustdoc-toggle.top-doc > summary::before,
1551details.rustdoc-toggle.non-exhaustive > summary,
1552details.rustdoc-toggle.non-exhaustive > summary::before {
1553 font-family: 'Fira Sans';
1554 font-size: 16px;
1555}
1556
1557details.non-exhaustive {
1558 margin-bottom: 8px;
1559}
1560
1561details.rustdoc-toggle > summary.hideme::before {
1562 position: relative;
1563}
1564
1565details.rustdoc-toggle > summary:not(.hideme)::before {
1566 position: absolute;
1567 left: -23px;
1568 top: 3px;
1569}
1570
1571.impl-items > details.rustdoc-toggle > summary:not(.hideme)::before,
1572.undocumented > details.rustdoc-toggle > summary:not(.hideme)::before {
1573 position: absolute;
1574 left: -2px;
1575}
1576
1577/* When a "hideme" summary is open and the "Expand description" or "Show
1578 methods" text is hidden, we want the [-] toggle that remains to not
1579 affect the layout of the items to its right. To do that, we use
1580 absolute positioning. Note that we also set position: relative
1581 on the parent <details> to make this work properly. */
1582details.rustdoc-toggle[open] > summary.hideme {
1583 position: absolute;
1584}
1585
1586details.rustdoc-toggle, details.undocumented {
1587 position: relative;
1588}
1589
1590details.rustdoc-toggle[open] > summary.hideme > span {
1591 display: none;
1592}
1593
94222f64
XL
1594details.rustdoc-toggle[open] > summary::before,
1595details.rustdoc-toggle[open] > summary.hideme::before {
1596 width: 17px;
1597 height: max(17px, 1.1em);
1598 background-repeat: no-repeat;
1599 background-position: top left;
1600 display: inline-block;
1601 content: "";
1602}
1603
1604details.rustdoc-toggle[open] > summary::after,
1605details.rustdoc-toggle[open] > summary.hideme::after {
1606 content: "Collapse";
17df50a5
XL
1607}
1608
1609details.undocumented > summary::before {
94222f64
XL
1610 padding-left: 17px;
1611 height: max(17px, 1.1em);
1612 background-repeat: no-repeat;
1613 background-position: top left;
1614 content: "Show hidden undocumented items";
17df50a5
XL
1615 cursor: pointer;
1616 font-size: 16px;
1617 font-weight: 300;
94222f64
XL
1618 opacity: .5;
1619}
1620
1621details.undocumented > summary:focus::before,
1622details.undocumented > summary:hover::before {
1623 opacity: 1;
17df50a5
XL
1624}
1625
1626details.undocumented[open] > summary::before {
94222f64
XL
1627 padding-left: 17px;
1628 height: max(17px, 1.1em);
1629 background-repeat: no-repeat
1630 background-position: top left;
1631 content: "Hide undocumented items";
17df50a5
XL
1632}
1633
1a4d82fc
JJ
1634/* Media Queries */
1635
3dfed10e
XL
1636@media (min-width: 701px) {
1637 /* In case there is no documentation before a code block, we need to add some margin at the top
1638 to prevent an overlay between the "collapse toggle" and the information tooltip.
6a06907d 1639 However, it's not needed with smaller screen width because the doc/code block is always put
3dfed10e 1640 "one line" below. */
cdc7bbd5 1641 .docblock > .information:first-child > .tooltip {
3dfed10e
XL
1642 margin-top: 16px;
1643 }
1644}
1645
1a4d82fc 1646@media (max-width: 700px) {
476ff2be
SL
1647 body {
1648 padding-top: 0px;
1649 }
1650
a1dfa0c6 1651 .rustdoc > .sidebar {
abe05a73 1652 height: 45px;
476ff2be 1653 min-height: 40px;
abe05a73
XL
1654 margin: 0;
1655 margin-left: -15px;
1656 padding: 0 15px;
476ff2be 1657 position: static;
0731742a 1658 z-index: 11;
476ff2be
SL
1659 }
1660
ff7c6d11 1661 .sidebar > .location {
476ff2be
SL
1662 float: right;
1663 margin: 0px;
abe05a73 1664 margin-top: 2px;
476ff2be
SL
1665 padding: 3px 10px 1px 10px;
1666 min-height: 39px;
1667 background: inherit;
1668 text-align: left;
1669 font-size: 24px;
1670 }
1671
1672 .sidebar .location:empty {
1673 padding: 0;
1674 }
1675
48663c56 1676 .sidebar .logo-container {
476ff2be 1677 width: 35px;
48663c56 1678 height: 35px;
476ff2be 1679 margin-top: 5px;
abe05a73 1680 margin-bottom: 5px;
476ff2be 1681 float: left;
ff7c6d11 1682 margin-left: 50px;
476ff2be
SL
1683 }
1684
48663c56
XL
1685 .sidebar .logo-container > img {
1686 max-width: 35px;
1687 max-height: 35px;
1688 }
1689
ff7c6d11
XL
1690 .sidebar-menu {
1691 position: fixed;
1692 z-index: 10;
1693 font-size: 2rem;
1694 cursor: pointer;
1695 width: 45px;
1696 left: 0;
1697 text-align: center;
1698 display: block;
1699 border-bottom: 1px solid;
1700 border-right: 1px solid;
2c00a5a8 1701 height: 45px;
476ff2be
SL
1702 }
1703
48663c56
XL
1704 .rustdoc.source > .sidebar > .sidebar-menu {
1705 display: none;
1706 }
1707
17df50a5
XL
1708 /* We do NOT hide this element so that alternative device readers still have this information
1709 available. */
ff7c6d11
XL
1710 .sidebar-elems {
1711 position: fixed;
1712 z-index: 1;
ff7c6d11
XL
1713 top: 45px;
1714 bottom: 0;
17df50a5
XL
1715 width: 246px;
1716 /* We move the sidebar to the left by its own width so it doesn't appear. */
1717 left: -246px;
ff7c6d11
XL
1718 overflow-y: auto;
1719 border-right: 1px solid;
476ff2be
SL
1720 }
1721
ff7c6d11 1722 .sidebar > .block.version {
136023e0 1723 overflow: hidden;
ff7c6d11 1724 border-bottom: none;
5869c6ff 1725 margin-bottom: 0;
136023e0
XL
1726 height: 100%;
1727 padding-left: 12px;
1728 }
1729 .sidebar > .block.version > div.narrow-helper {
1730 float: left;
1731 width: 1px;
1732 height: 100%;
1733 }
1734 .sidebar > .block.version > p {
1735 /* hide Version text if too narrow */
1736 margin: 0;
1737 min-width: 55px;
1738 /* vertically center */
1739 display: flex;
1740 align-items: center;
1741 height: 100%;
ff7c6d11
XL
1742 }
1743
1744 nav.sub {
2c00a5a8
XL
1745 width: calc(100% - 32px);
1746 float: right;
ff7c6d11
XL
1747 }
1748
476ff2be
SL
1749 .content {
1750 margin-left: 0px;
1751 }
1752
5869c6ff 1753 #main, #search {
2c00a5a8
XL
1754 margin-top: 45px;
1755 padding: 0;
1756 }
1757
abe05a73
XL
1758 #search {
1759 margin-left: 0;
1760 }
1761
0531ce1d
XL
1762 .anchor {
1763 display: none !important;
1764 }
0bf4aa26 1765
48663c56
XL
1766 .theme-picker {
1767 left: 10px;
1768 top: 54px;
1769 z-index: 1;
476ff2be 1770 }
ea8adc8c 1771
17df50a5 1772 .notable-traits {
3dfed10e
XL
1773 position: absolute;
1774 left: -22px;
1775 top: 24px;
1776 }
1777
fc512014 1778 #titles > button > div.count {
ff7c6d11
XL
1779 float: left;
1780 width: 100%;
1781 }
1782
1783 #titles {
1784 height: 50px;
1785 }
1786
1787 .sidebar.mobile {
1788 position: fixed;
1789 width: 100%;
1790 margin-left: 0;
1791 background-color: rgba(0,0,0,0);
1792 height: 100%;
1793 }
5869c6ff
XL
1794 /*
1795 This allows to prevent the version text to overflow the sidebar title on mobile mode when the
1796 sidebar is displayed (after clicking on the "hamburger" button).
1797 */
1798 .sidebar.mobile > div.version {
1799 overflow: hidden;
1800 max-height: 33px;
1801 }
0bf4aa26
XL
1802 .sidebar {
1803 width: calc(100% + 30px);
1804 }
ff7c6d11 1805
136023e0
XL
1806 .show-it, .sidebar-elems:focus-within {
1807 z-index: 2;
17df50a5 1808 left: 0;
2c00a5a8
XL
1809 }
1810
1811 .show-it > .block.items {
1812 margin: 8px 0;
1813 }
1814
1815 .show-it > .block.items > ul {
1816 margin: 0;
1817 }
1818
1819 .show-it > .block.items > ul > li {
1820 text-align: center;
1821 margin: 2px 0;
1822 }
1823
1824 .show-it > .block.items > ul > li > a {
1825 font-size: 21px;
ff7c6d11
XL
1826 }
1827
1828 /* Because of ios, we need to actually have a full height sidebar title so the
1829 * actual sidebar can show up. But then we need to make it transparent so we don't
1830 * hide content. The filler just allows to create the background for the sidebar
1831 * title. But because of the absolute position, I had to lower the z-index.
1832 */
1833 #sidebar-filler {
1834 position: fixed;
1835 left: 45px;
1836 width: calc(100% - 45px);
1837 top: 0;
1838 height: 45px;
1839 z-index: -1;
1840 border-bottom: 1px solid;
1841 }
0531ce1d 1842
17df50a5
XL
1843 #main > details.rustdoc-toggle > summary::before,
1844 #main > div > details.rustdoc-toggle > summary::before {
1845 left: -11px;
cdc7bbd5
XL
1846 }
1847
0bf4aa26
XL
1848 #all-types {
1849 margin: 10px;
1850 }
48663c56
XL
1851
1852 #sidebar-toggle {
1853 top: 100px;
1854 width: 30px;
1855 font-size: 1.5rem;
1856 text-align: center;
1857 padding: 0;
1858 }
1859
1860 #source-sidebar {
1861 z-index: 11;
1862 }
1863
1864 #main > .line-numbers {
1865 margin-top: 0;
1866 }
3dfed10e
XL
1867
1868 .notable-traits .notable-traits-tooltiptext {
1869 left: 0;
1870 top: 100%;
1871 }
29967ef6
XL
1872
1873 /* We don't display the help button on mobile devices. */
17df50a5 1874 #help-button {
29967ef6
XL
1875 display: none;
1876 }
136023e0
XL
1877
1878 /* Display an alternating layout on tablets and phones */
1879 .item-table {
1880 display: flex;
1881 flex-flow: column wrap;
1882 }
1883 .item-left, .item-right {
1884 width: 100%;
1885 }
1886
29967ef6
XL
1887 .search-container > div {
1888 width: calc(100% - 32px);
1889 }
17df50a5
XL
1890
1891 /* Display an alternating layout on tablets and phones */
1892 .search-results > a {
1893 border-bottom: 1px solid #aaa9;
1894 padding: 5px 0px;
1895 }
1896 .search-results .result-name, .search-results div.desc, .search-results .result-description {
1897 width: 100%;
1898 }
136023e0 1899 .search-results div.desc, .search-results .result-description, .item-right {
17df50a5
XL
1900 padding-left: 2em;
1901 }
ff7c6d11
XL
1902}
1903
48663c56 1904@media print {
17df50a5 1905 nav.sub, .content .out-of-band {
48663c56
XL
1906 display: none;
1907 }
1908}
ff7c6d11 1909
5869c6ff 1910@media (max-width: 464px) {
fc512014 1911 #titles, #titles > button {
ff7c6d11
XL
1912 height: 73px;
1913 }
1914
5869c6ff
XL
1915 /* This is to prevent the search bar from being underneath the <section>
1916 * element following it.
1917 */
1918 #main, #search {
fc512014
XL
1919 margin-top: 100px;
1920 }
1921
29967ef6
XL
1922 #main > table:not(.table-display) td {
1923 word-break: break-word;
fc512014 1924 width: 50%;
29967ef6
XL
1925 }
1926
1927 .search-container > div {
1928 display: block;
1929 width: calc(100% - 37px);
1930 }
1931
1932 #crate-search {
1933 width: 100%;
1934 border-radius: 4px;
1935 border: 0;
1936 }
1937
1938 #crate-search + .search-input {
1939 width: calc(100% + 71px);
1940 margin-left: -36px;
1941 }
1942
1943 #theme-picker, #settings-menu {
1944 padding: 5px;
1945 width: 31px;
1946 height: 31px;
1947 }
1948
1949 #theme-picker {
1950 margin-top: -2px;
1951 }
1952
1953 #settings-menu {
1954 top: 7px;
ff7c6d11 1955 }
5869c6ff
XL
1956
1957 .docblock {
1958 margin-left: 12px;
1959 }
ff7c6d11 1960}