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