rustdoc.css 26.3 KB
Newer Older
1
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
2
@font-face {
3 4 5 6
	font-family: 'Fira Sans';
	font-style: normal;
	font-weight: 400;
	src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
7 8
}
@font-face {
9 10 11 12
	font-family: 'Fira Sans';
	font-style: normal;
	font-weight: 500;
	src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
13
}
14

15
/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */
16
@font-face {
17 18 19
	font-family: 'Source Serif Pro';
	font-style: normal;
	font-weight: 400;
20
	src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff');
21 22
}
@font-face {
23 24 25
	font-family: 'Source Serif Pro';
	font-style: italic;
	font-weight: 400;
26
	src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff');
27 28
}
@font-face {
29 30 31
	font-family: 'Source Serif Pro';
	font-style: normal;
	font-weight: 700;
32
	src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff');
33
}
34 35

/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
36
@font-face {
37 38 39
	font-family: 'Source Code Pro';
	font-style: normal;
	font-weight: 400;
40 41 42
	/* Avoid using locally installed font because bad versions are in circulation:
	 * see https://github.com/rust-lang/rust/issues/24355 */
	src: url("SourceCodePro-Regular.woff") format('woff');
43 44
}
@font-face {
45 46 47
	font-family: 'Source Code Pro';
	font-style: normal;
	font-weight: 600;
48
	src: url("SourceCodePro-Semibold.woff") format('woff');
49
}
50

51 52
* {
  -webkit-box-sizing: border-box;
53 54
	 -moz-box-sizing: border-box;
		  box-sizing: border-box;
55 56
}

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
/* This part handles the "default" theme being used depending on the system one. */
html {
	content: "";
}
@media (prefers-color-scheme: light) {
	html {
		content: "light";
	}
}
@media (prefers-color-scheme: dark) {
	html {
		content: "dark";
	}
}

A
Adrien Tétar 已提交
72
/* General structure and fonts */
73 74

body {
J
Jon Gjengset 已提交
75
	font: 16px/1.4 "Source Serif Pro", serif;
76 77 78
	margin: 0;
	position: relative;
	padding: 10px 15px 20px 15px;
79

80 81 82
	-webkit-font-feature-settings: "kern", "liga";
	-moz-font-feature-settings: "kern", "liga";
	font-feature-settings: "kern", "liga";
83 84
}

A
Adrien Tétar 已提交
85
h1 {
86
	font-size: 1.5em;
A
Adrien Tétar 已提交
87 88
}
h2 {
89
	font-size: 1.4em;
A
Adrien Tétar 已提交
90 91
}
h3 {
92
	font-size: 1.3em;
A
Adrien Tétar 已提交
93
}
94
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
95 96 97
	font-weight: 500;
	margin: 20px 0 15px 0;
	padding-bottom: 6px;
98
}
A
Adrien Tétar 已提交
99
h1.fqn {
100 101
	border-bottom: 1px dashed;
	margin-top: 0;
102
}
103
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
104
	border-bottom: 1px solid;
105
}
106
h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
J
John Heitmann 已提交
107
	flex-basis: 100%;
108
	font-weight: 600;
J
John Heitmann 已提交
109
	margin-top: 16px;
110 111
	margin-bottom: 10px;
	position: relative;
A
Adrien Tétar 已提交
112
}
113
h3.impl, h3.method, h3.type {
114
	padding-left: 15px;
A
Adrien Tétar 已提交
115
}
116 117 118

h1, h2, h3, h4,
.sidebar, a.source, .search-input, .content table :not(code)>a,
G
Guillaume Gomez 已提交
119 120
.collapse-toggle, div.item-list .out-of-band,
#source-sidebar, #sidebar-toggle {
J
Jon Gjengset 已提交
121
	font-family: "Fira Sans", sans-serif;
122 123
}

A
Adrien Tétar 已提交
124
ol, ul {
125
	padding-left: 25px;
126
}
A
Adrien Tétar 已提交
127
ul ul, ol ul, ul ol, ol ol {
128
	margin-bottom: .6em;
A
Adrien Tétar 已提交
129
}
130 131

p {
132
	margin: 0 0 .6em 0;
133
}
A
Adrien Tétar 已提交
134

135 136 137 138
summary {
	outline: none;
}

A
Adrien Tétar 已提交
139
code, pre {
J
Jon Gjengset 已提交
140
	font-family: "Source Code Pro", monospace;
A
Adrien Tétar 已提交
141
}
Liigo's avatar
Liigo 已提交
142
.docblock code, .docblock-short code {
143
	border-radius: 3px;
144
	padding: 0 0.1em;
145
}
146
.docblock pre code, .docblock-short pre code, .docblock code.spotlight {
147
	padding: 0;
I
Ivan Ukhov 已提交
148
}
149 150 151
.docblock code.spotlight :last-child {
	padding-bottom: 0.6em;
}
A
Adrien Tétar 已提交
152
pre {
153
	padding: 14px;
A
Adrien Tétar 已提交
154 155
}

156
.source .content pre {
157
	padding: 20px;
158 159
}

W
Wesley Wiser 已提交
160
img {
161
	max-width: 100%;
W
Wesley Wiser 已提交
162 163
}

164 165 166 167
li {
	position: relative;
}

168
.source .content {
169 170 171 172 173
	margin-top: 50px;
	max-width: none;
	overflow: visible;
	margin-left: 0px;
	min-width: 70em;
174 175
}

176
nav.sub {
177 178
	font-size: 16px;
	text-transform: uppercase;
179 180 181
}

.sidebar {
182
	width: 200px;
G
Guillaume Gomez 已提交
183
	position: fixed;
184 185
	left: 0;
	top: 0;
186
	bottom: 0;
G
Guillaume Gomez 已提交
187
	overflow: auto;
188 189
}

G
Guillaume Gomez 已提交
190
.sidebar .block > ul > li {
G
Guillaume Gomez 已提交
191
	margin-right: -10px;
192 193
}

G
Guillaume Gomez 已提交
194 195 196
.content, nav {
	max-width: 960px;
}
197 198 199

/* Everything else */

G
Guillaume Gomez 已提交
200 201 202
.js-only, .hidden {
	display: none !important;
}
203

204
.logo-container {
G
Guillaume Gomez 已提交
205 206 207
	height: 100px;
	width: 100px;
	position: relative;
208 209
	margin: 20px auto;
	display: block;
210
	margin-top: 10px;
211 212
}

G
Guillaume Gomez 已提交
213 214 215 216 217 218 219 220 221 222
.logo-container > img {
	max-width: 100px;
	max-height: 100px;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: block;
}

223
.sidebar .location {
224
	border: 1px solid;
225
	font-size: 17px;
226
	margin: 30px 10px 20px 10px;
227
	text-align: center;
228
	word-wrap: break-word;
229 230
}

231 232 233
.sidebar .version {
	font-size: 15px;
	text-align: center;
G
Guillaume Gomez 已提交
234
	border-bottom: 1px solid;
235 236 237 238 239
	overflow-wrap: break-word;
	word-wrap: break-word; /* deprecated */
	word-break: break-word; /* Chrome, non-standard */
}

240 241 242 243
.location:empty {
	border: none;
}

G
Guillaume Gomez 已提交
244 245 246
.location a:first-child {
	font-weight: 500;
}
247

248
.block {
249
	padding: 0;
250
	margin-bottom: 14px;
251
}
252
.block h2, .block h3 {
253 254 255
	margin-top: 0;
	margin-bottom: 8px;
	text-align: center;
256
}
257
.block ul, .block li {
258
	margin: 0 10px;
259 260
	padding: 0;
	list-style: none;
261
}
262

263
.block a {
264 265 266 267 268 269 270 271
	display: block;
	text-overflow: ellipsis;
	overflow: hidden;
	line-height: 15px;
	padding: 7px 5px;
	font-size: 14px;
	font-weight: 300;
	transition: border 500ms ease-out;
272 273
}

274
.sidebar-title {
G
Guillaume Gomez 已提交
275 276
	border-top: 1px solid;
	border-bottom: 1px solid;
277 278 279 280 281 282 283 284 285 286 287 288 289 290
	text-align: center;
	font-size: 17px;
	margin-bottom: 5px;
}

.sidebar-links {
	margin-bottom: 15px;
}

.sidebar-links > a {
	padding-left: 10px;
	width: 100%;
}

291 292 293 294
.sidebar-menu {
	display: none;
}

295
.content {
296
	padding: 15px 0;
297 298
}

299
.source .content pre.rust {
300 301 302
	white-space: pre;
	overflow: auto;
	padding-left: 0;
303
}
G
Guillaume Gomez 已提交
304

G
Guillaume Gomez 已提交
305
.rustdoc:not(.source) .example-wrap {
306
	display: inline-flex;
307
	margin-bottom: 10px;
G
Guillaume Gomez 已提交
308 309 310
}

.example-wrap {
311 312 313 314 315 316 317 318 319 320 321 322
	width: 100%;
}

.example-wrap > pre.line-number {
	overflow: initial;
	border: 1px solid;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	padding: 13px 8px;
	text-align: right;
}

G
Guillaume Gomez 已提交
323
.rustdoc:not(.source) .example-wrap > pre.rust {
324
	width: 100%;
G
Guillaume Gomez 已提交
325
	overflow-x: auto;
326 327
}

G
Guillaume Gomez 已提交
328
.rustdoc:not(.source) .example-wrap > pre {
329 330 331
	margin: 0;
}

332 333
#search {
	margin-left: 230px;
G
Guillaume Gomez 已提交
334
	position: relative;
335
}
G
Guillaume Gomez 已提交
336 337 338 339 340 341 342 343

#results {
	position: absolute;
	right: 0;
	left: 0;
	overflow: auto;
}

G
Guillaume Gomez 已提交
344 345 346 347 348
#results > table {
	width: 100%;
	table-layout: fixed;
}

349
.content pre.line-numbers {
350 351 352
	float: left;
	border: none;
	position: relative;
353

354 355 356 357
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
358
}
G
Guillaume Gomez 已提交
359 360 361
.line-numbers span {
	cursor: pointer;
}
362

Liigo's avatar
Liigo 已提交
363
.docblock-short p {
364
	display: inline;
365 366
}

Liigo's avatar
Liigo 已提交
367
.docblock-short.nowrap {
368 369 370 371
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
372
}
373

Liigo's avatar
Liigo 已提交
374
.docblock-short p {
375 376 377
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
378
}
G
Guillaume Gomez 已提交
379
.docblock-short code {
V
vlad-boroda 已提交
380
	white-space: pre-wrap;
G
Guillaume Gomez 已提交
381
}
382 383

.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
384
	border-bottom: 1px solid;
385
}
386

387 388 389 390
#main > .docblock h1 { font-size: 1.3em; }
#main > .docblock h2 { font-size: 1.15em; }
#main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }

391
#main > h2 + div, #main > h2 + h3, #main > h3 + div {
J
John Heitmann 已提交
392 393
	display: none; /* Changed to flex or block via js once the page is loaded */
	flex-wrap: wrap;
394 395
}

396 397 398
.docblock h1 { font-size: 1em; }
.docblock h2 { font-size: 0.95em; }
.docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
399

400
.docblock {
401
	margin-left: 24px;
402
	position: relative;
403 404
}

A
Aaron Turon 已提交
405
.content .out-of-band {
406
	float: right;
407 408 409 410
	font-size: 23px;
	margin: 0px;
	padding: 0px;
	font-weight: normal;
411 412 413
}

h3.impl > .out-of-band {
414
	font-size: 21px;
415 416
}

417 418 419 420
h4.method > .out-of-band {
	font-size: 19px;
}

E
Eitan Adler 已提交
421
h4 > code, h3 > code, .invisible > code {
422 423
	max-width: calc(100% - 41px);
	display: block;
424 425
}

N
Nick Cameron 已提交
426
.invisible {
427 428
	width: 100%;
	display: inline-block;
N
Nick Cameron 已提交
429 430
}

431
.content .in-band {
432 433
	margin: 0px;
	padding: 0px;
434 435
}

G
Guillaume Gomez 已提交
436 437 438 439
.in-band > code {
	display: inline-block;
}

G
Guillaume Gomez 已提交
440 441 442
#main {
	position: relative;
}
443
#main > .since {
444
	top: inherit;
J
Jon Gjengset 已提交
445
	font-family: "Fira Sans", sans-serif;
446 447
}

G
Guillaume Gomez 已提交
448
.content table:not(.table-display) {
449
	border-spacing: 0 5px;
450 451 452 453 454
}
.content td { vertical-align: top; }
.content td:first-child { padding-right: 20px; }
.content td p:first-child { margin-top: 0; }
.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
455
.content tr:first-child td { border-top: 0; }
456

457
.docblock table {
458
	margin: .5em 0;
G
Guillaume Gomez 已提交
459 460
	width: calc(100% - 2px);
	border: 1px dashed;
461 462 463
}

.docblock table td {
464
	padding: .5em;
465
	border: 1px dashed;
466 467 468
}

.docblock table th {
469 470
	padding: .5em;
	text-align: left;
471
	border: 1px solid;
472 473
}

474 475 476 477
.fields + table {
	margin-bottom: 1em;
}

478
.content .item-list {
479 480
	list-style-type: none;
	padding: 0;
481 482 483
}

.content .multi-column {
484 485 486 487 488 489
	-moz-column-count: 5;
	-moz-column-gap: 2.5em;
	-webkit-column-count: 5;
	-webkit-column-gap: 2.5em;
	column-count: 5;
	column-gap: 2.5em;
490 491 492
}
.content .multi-column li { width: 100%; display: inline-block; }

493
.content .method {
494 495
	font-size: 1em;
	position: relative;
496
}
497
/* Shift "where ..." part of method or fn definition down a line */
498 499 500
.content .method .where,
.content .fn .where,
.content .where.fmt-newline {
G
Guillaume Gomez 已提交
501
	display: block;
502
	font-size: 0.8em;
503
}
D
Dirk Gadsden 已提交
504

G
Guillaume Gomez 已提交
505 506 507 508
.content .methods > div:not(.important-traits) {
	margin-left: 40px;
	margin-bottom: 15px;
}
509

510
.content .docblock > .impl-items {
511
	margin-left: 20px;
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
	margin-top: -34px;
}
.content .docblock > .impl-items > h4 {
	border-bottom: 0;
}
.content .docblock >.impl-items .table-display {
	margin: 0;
}
.content .docblock >.impl-items table td {
	padding: 0;
}
.toggle-wrapper.marg-left > .collapse-toggle {
	left: -24px;
}
.content .docblock > .impl-items .table-display, .impl-items table td {
	border: none;
528
}
529

530
.content .stability code {
531
	font-size: 90%;
532 533
}

534 535 536 537 538
.content .stability {
	position: relative;
	margin-left: 33px;
	margin-top: -13px;
}
539

G
Guillaume Gomez 已提交
540 541 542 543
.sub-variant > div > .stability {
	margin-top: initial;
}

544 545 546 547 548 549 550
.content .stability::before {
	content: '˪';
	font-size: 30px;
	position: absolute;
	top: -9px;
	left: -13px;
}
551 552 553 554 555 556 557 558 559 560 561 562 563 564

.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
	margin-left: 20px;
}

.content .impl-items .docblock, .content .impl-items .stability {
	margin-bottom: .6em;
}

.content .impl-items > .stability {
	margin-left: 40px;
}

.methods > .stability, .content .impl-items > .stability {
565 566
	margin-top: -8px;
}
567

J
John Heitmann 已提交
568 569 570 571
.impl-items {
	flex-basis: 100%;
}

572 573 574 575
#main > .stability {
	margin-top: 0;
}

576
nav:not(.sidebar) {
577 578 579
	border-bottom: 1px solid;
	padding-bottom: 10px;
	margin-bottom: 10px;
580 581
}
nav.main {
582 583
	padding: 20px 0;
	text-align: center;
584 585
}
nav.main .current {
586 587
	border-top: 1px solid;
	border-bottom: 1px solid;
588 589
}
nav.main .separator {
590 591 592 593
	border: 1px solid;
	display: inline-block;
	height: 23px;
	margin: 0 20px;
594 595 596 597
}
nav.sum { text-align: right; }
nav.sub form { display: inline; }

598
nav.sub, .content {
599
	margin-left: 230px;
600 601 602
}

a {
603 604
	text-decoration: none;
	background: transparent;
605
}
606

G
Guillaume Gomez 已提交
607 608 609
.small-section-header:hover > .anchor {
	display: initial;
}
J
Jouan Amate 已提交
610 611

.in-band:hover > .anchor {
G
Guillaume Gomez 已提交
612 613
	display: inline-block;
	position: absolute;
J
Jouan Amate 已提交
614
}
G
Guillaume Gomez 已提交
615 616
.anchor {
	display: none;
617
	position: absolute;
618
	left: -7px;
G
Guillaume Gomez 已提交
619
}
620
.anchor.field {
621
	left: -5px;
622
}
623 624
.small-section-header > .anchor {
	left: -28px;
625
	padding-right: 10px; /* avoid gap that causes hover to disappear */
626
}
627
.anchor:before {
G
Guillaume Gomez 已提交
628 629 630
	content: '\2002\00a7\2002';
}

G
Guillaume Gomez 已提交
631 632
.docblock a:not(.srclink):not(.test-arrow):hover,
.docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
633
	text-decoration: underline;
634
}
635

G
Guillaume Gomez 已提交
636
.invisible > .srclink, h4 > code + .srclink {
637 638 639 640 641 642 643
	position: absolute;
	top: 0;
	right: 0;
	font-size: 17px;
	font-weight: normal;
}

644
.block a.current.crate { font-weight: 500; }
645

G
Guillaume Gomez 已提交
646 647 648
.search-container {
	position: relative;
}
G
Guillaume Gomez 已提交
649 650 651 652 653 654 655
.search-container > div {
	display: inline-flex;
	width: calc(100% - 34px);
}
#crate-search {
	margin-top: 5px;
	padding: 6px;
656
	padding-right: 19px;
657
	flex: none;
G
Guillaume Gomez 已提交
658 659 660 661 662 663 664 665 666 667 668
	border: 0;
	border-right: 0;
	border-radius: 4px 0 0 4px;
	outline: none;
	cursor: pointer;
	border-right: 1px solid;
	-moz-appearance: none;
	-webkit-appearance: none;
	/* Removes default arrow from firefox */
	text-indent: 0.01px;
	text-overflow: "";
669 670
	background-repeat: no-repeat;
	background-color: transparent;
671
	background-size: 20px;
672
	background-position: calc(100% - 1px) 56%;
G
Guillaume Gomez 已提交
673
}
G
Guillaume Gomez 已提交
674 675 676 677 678
.search-container > .top-button {
	position: absolute;
	right: 0;
	top: 10px;
}
679
.search-input {
680 681 682 683 684 685 686
	/* Override Normalize.css: we have margins and do
	 not want to overflow - the `moz` attribute is necessary
	 until Firefox 29, too early to drop at this point */
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
	outline: none;
	border: none;
687
	border-radius: 1px;
688 689 690 691 692 693
	margin-top: 5px;
	padding: 10px 16px;
	font-size: 17px;
	transition: border-color 300ms ease;
	transition: border-radius 300ms ease-in-out;
	transition: box-shadow 300ms ease-in-out;
694
	width: 100%;
695 696
}

697 698
#crate-search + .search-input {
	border-radius: 0 1px 1px 0;
699
	width: calc(100% - 32px);
700 701
}

702
.search-input:focus {
703 704 705
	border-radius: 2px;
	border: 0;
	outline: 0;
A
Adrien Tétar 已提交
706
}
707

708
.search-results .desc {
709 710 711 712
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	display: block;
713 714
}

715
.search-results a {
716
	display: block;
717 718
}

G
Guillaume Gomez 已提交
719 720
.content .search-results td:first-child {
	padding-right: 0;
721
	width: 50%;
G
Guillaume Gomez 已提交
722 723 724 725
}
.content .search-results td:first-child a {
	padding-right: 10px;
}
726
.content .search-results td:first-child a:after {
G
Guillaume Gomez 已提交
727 728 729
	clear: both;
	content: "";
	display: block;
730
}
G
Guillaume Gomez 已提交
731 732 733
.content .search-results td:first-child a span {
	float: left;
}
734

735
tr.result span.primitive::after {
G
Guillaume Gomez 已提交
736 737
	content: ' (primitive type)';
	font-style: italic;
E
Eitan Adler 已提交
738
}
739

G
Guillaume Gomez 已提交
740 741 742 743 744
tr.result span.keyword::after {
	content: ' (keyword)';
	font-style: italic;
}

745
body.blur > :not(#help) {
746 747 748
	filter: blur(8px);
	-webkit-filter: blur(8px);
	opacity: .7;
749 750
}

751
#help {
752 753 754 755 756 757 758 759
	width: 100%;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	justify-content: center;
	align-items: center;
760 761
}
#help > div {
762 763 764
	flex: 0 0 auto;
	box-shadow: 0 0 6px rgba(0,0,0,.2);
	width: 550px;
M
Marcel Hellwig 已提交
765
	height: auto;
G
Guillaume Gomez 已提交
766
	border: 1px solid;
767 768
}
#help dt {
769 770 771
	float: left;
	clear: left;
	display: block;
772
}
G
Guillaume Gomez 已提交
773
#help dd { margin: 5px 35px; }
774
#help .infos { padding-left: 0; }
775
#help h1, #help h2 { margin-top: 0; }
776
#help > div div {
777 778 779
	width: 50%;
	float: left;
	padding: 20px;
G
Guillaume Gomez 已提交
780
	padding-left: 17px;
781
}
782

783 784
.stab {
	display: table;
785 786 787 788 789
	border-width: 1px;
	border-style: solid;
	padding: 3px;
	margin-bottom: 5px;
	font-size: 90%;
790
}
791
.stab p {
792
	display: inline;
793 794
}

795 796 797 798
.stab summary {
	display: list-item;
}

799
.stab .emoji {
800 801 802
	font-size: 1.5em;
}

803
.module-item .stab {
804 805 806 807 808 809 810 811
	border-radius: 3px;
	display: inline-block;
	font-size: 80%;
	line-height: 1.2;
	margin-bottom: 0;
	margin-right: .3em;
	padding: 2px;
	vertical-align: text-bottom;
812
}
813

814
.module-item.unstable {
815
	opacity: 0.65;
816
}
817

818
.since {
819 820 821 822 823
	font-weight: normal;
	font-size: initial;
	position: absolute;
	right: 0;
	top: 0;
824 825
}

J
John Heitmann 已提交
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852
.impl-items .since, .impl .since {
	flex-grow: 0;
	padding-left: 12px;
	padding-right: 2px;
	position: initial;
}

.impl-items .srclink, .impl .srclink {
	flex-grow: 0;
	/* Override header settings otherwise it's too bold */
	font-size: 17px;
	font-weight: normal;
}

.impl-items code, .impl code {
	flex-grow: 1;
}

.impl-items h4, h4.impl, h3.impl {
	display: flex;
	flex-basis: 100%;
	font-size: 16px;
	margin-bottom: 12px;
	/* Push the src link out to the right edge consistently */
	justify-content: space-between;
}

853
.variants_table {
854
	width: 100%;
855 856 857
}

.variants_table tbody tr td:first-child {
858
	width: 1%; /* make the variant name as small as possible */
859 860
}

861
td.summary-column {
862
	width: 100%;
863 864
}

A
Aaron Turon 已提交
865
.summary {
866
	padding-right: 0px;
A
Aaron Turon 已提交
867 868
}

E
est31 已提交
869
pre.rust .question-mark {
870
	font-weight: bold;
E
est31 已提交
871
}
872

873
a.test-arrow {
874 875 876 877 878 879 880
	display: inline-block;
	position: absolute;
	padding: 5px 10px 5px 10px;
	border-radius: 5px;
	font-size: 130%;
	top: 5px;
	right: 5px;
881
}
882
a.test-arrow:hover{
883
	text-decoration: none;
884
}
885

886 887 888
.section-header:hover a:before {
	position: absolute;
	left: -25px;
889
	padding-right: 10px; /* avoid gap that causes hover to disappear */
890
	content: '\2002\00a7\2002';
891
}
D
Daniel Fagnan 已提交
892

893
.section-header:hover a {
894
	text-decoration: none;
895 896 897
}

.section-header a {
898
	color: inherit;
899 900
}

901
.collapse-toggle {
902 903 904 905
	font-weight: 300;
	position: absolute;
	left: -23px;
	top: 0;
906 907
}

908 909 910 911 912
h3 > .collapse-toggle, h4 > .collapse-toggle {
	font-size: 0.8em;
	top: 5px;
}

913
.toggle-wrapper > .collapse-toggle {
914 915
	left: -24px;
	margin-top: 0px;
916 917 918
}

.toggle-wrapper {
919
	position: relative;
920
	margin-top: 0;
921 922 923
}

.toggle-wrapper.collapsed {
924
	height: 25px;
925
	transition: height .2s;
926
	margin-bottom: .6em;
927 928 929
}

.collapse-toggle > .inner {
930 931 932
	display: inline-block;
	width: 1.2ch;
	text-align: center;
933 934
}

935 936 937 938 939
.collapse-toggle.hidden-default {
	position: relative;
	margin-left: 20px;
}

940
.since + .srclink {
941 942
	display: table-cell;
	padding-left: 10px;
943
}
944

945 946 947 948 949
.item-spacer {
	width: 100%;
	height: 12px;
}

950
.out-of-band > span.since {
951 952 953
	position: initial;
	font-size: 20px;
	margin-right: 5px;
G
Guillaume Gomez 已提交
954 955
}

956
.toggle-wrapper > .collapse-toggle {
957
	left: 0;
958 959
}

G
Guillaume Gomez 已提交
960 961 962 963
.variant + .toggle-wrapper + .docblock > p {
	margin-top: 5px;
}

964
.sub-variant, .sub-variant > h3 {
G
Guillaume Gomez 已提交
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981
	margin-top: 1px !important;
}

#main > .sub-variant > h3 {
	font-size: 15px;
	margin-left: 25px;
	margin-bottom: 5px;
}

.sub-variant > div {
	margin-left: 20px;
	margin-bottom: 10px;
}

.sub-variant > div > span {
	display: block;
	position: relative;
982 983
}

984 985 986 987 988 989
.toggle-label {
	display: inline-block;
	margin-left: 4px;
	margin-top: 3px;
}

990
.enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
991 992 993
	margin-left: 30px;
	margin-bottom: 20px;
	margin-top: 5px;
994 995
}

996 997
.docblock > .section-header:first-child {
	margin-left: 15px;
998
	margin-top: 0;
999 1000 1001 1002 1003 1004
}

.docblock > .section-header:first-child:hover > a:before {
	left: -10px;
}

1005
.enum > .collapsed, .struct > .collapsed {
1006
	margin-bottom: 25px;
1007 1008
}

1009
#main > .variant, #main > .structfield {
1010 1011 1012 1013 1014
	display: block;
}

.attributes {
	display: block;
1015 1016 1017 1018
	margin-top: 0px !important;
	margin-right: 0px;
	margin-bottom: 0px !important;
	margin-left: 30px;
1019 1020
}
.toggle-attributes.collapsed {
1021 1022 1023 1024 1025 1026 1027
	margin-bottom: 0;
}
.impl-items > .toggle-attributes {
	margin-left: 20px;
}
.impl-items .attributes {
	font-weight: 500;
G
Guillaume Gomez 已提交
1028 1029
}

1030
:target > code {
G
Guillaume Gomez 已提交
1031
	opacity: 1;
1032 1033
}

G
Guillaume Gomez 已提交
1034 1035
.information {
	position: absolute;
1036
	left: -20px;
G
Guillaume Gomez 已提交
1037
	margin-top: 7px;
G
Guillaume Gomez 已提交
1038
	z-index: 1;
G
Guillaume Gomez 已提交
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
}

.tooltip {
	position: relative;
	display: inline-block;
	cursor: pointer;
}

.tooltip .tooltiptext {
	width: 120px;
	display: none;
	text-align: center;
	padding: 5px 3px;
	border-radius: 6px;
	margin-left: 5px;
	top: -5px;
	left: 105%;
J
John Heitmann 已提交
1056
	z-index: 10;
G
Guillaume Gomez 已提交
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071
}

.tooltip:hover .tooltiptext {
	display: inline;
}

.tooltip .tooltiptext::after {
	content: " ";
	position: absolute;
	top: 50%;
	left: 11px;
	margin-top: -5px;
	border-width: 5px;
	border-style: solid;
}
G
Guillaume Gomez 已提交
1072

1073
.important-traits .tooltip .tooltiptext {
G
Guillaume Gomez 已提交
1074
	border: 1px solid;
1075 1076
}

G
Guillaume Gomez 已提交
1077 1078
pre.rust {
	position: relative;
1079 1080
	tab-width: 4;
	-moz-tab-width: 4;
G
Guillaume Gomez 已提交
1081
}
1082 1083 1084 1085 1086 1087

.search-failed {
	text-align: center;
	margin-top: 20px;
}

1088 1089 1090 1091 1092 1093 1094
.search-failed > ul {
	text-align: left;
	max-width: 570px;
	margin-left: auto;
	margin-right: auto;
}

1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
#titles {
	height: 35px;
}

#titles > div {
	float: left;
	width: 33.3%;
	text-align: center;
	font-size: 18px;
	cursor: pointer;
G
Guillaume Gomez 已提交
1105
	border-top: 2px solid;
1106 1107
}

1108
#titles > div:not(:last-child) {
G
Guillaume Gomez 已提交
1109 1110
	margin-right: 1px;
	width: calc(33.3% - 1px);
1111
}
1112 1113 1114 1115 1116

#titles > div > div.count {
	display: inline-block;
	font-size: 16px;
}
1117

1118 1119
.important-traits {
	cursor: pointer;
1120
	z-index: 2;
1121 1122
}

1123 1124 1125 1126 1127 1128
h4 > .important-traits {
	position: absolute;
	left: -44px;
	top: 2px;
}

G
Guillaume Gomez 已提交
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140
#all-types {
	text-align: center;
	border: 1px solid;
	margin: 0 10px;
	margin-bottom: 10px;
	display: block;
	border-radius: 7px;
}
#all-types > p {
	margin: 5px 0;
}

1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173
#sidebar-toggle {
	position: fixed;
	top: 30px;
	left: 300px;
	z-index: 10;
	padding: 3px;
	border-top-right-radius: 3px;
	border-bottom-right-radius: 3px;
	cursor: pointer;
	font-weight: bold;
	transition: left .5s;
	font-size: 1.2em;
	border: 1px solid;
	border-left: 0;
}
#source-sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 300px;
	z-index: 1;
	overflow: auto;
	transition: left .5s;
	border-right: 1px solid;
}
#source-sidebar > .title {
	font-size: 1.5em;
	text-align: center;
	border-bottom: 1px solid;
	margin-bottom: 6px;
}

G
Guillaume Gomez 已提交
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222
.theme-picker {
	position: absolute;
	left: 211px;
	top: 19px;
}

.theme-picker button {
	outline: none;
}

#settings-menu {
	position: absolute;
	right: 0;
	top: 10px;
	outline: none;
}

#theme-picker, #settings-menu {
	padding: 4px;
	width: 27px;
	height: 29px;
	border: 1px solid;
	border-radius: 3px;
	cursor: pointer;
}

#theme-choices {
	display: none;
	position: absolute;
	left: 0;
	top: 28px;
	border: 1px solid;
	border-radius: 3px;
	z-index: 1;
	cursor: pointer;
}

#theme-choices > button {
	border: none;
	width: 100%;
	padding: 4px;
	text-align: center;
	background: rgba(0,0,0,0);
}

#theme-choices > button:not(:first-child) {
	border-top: 1px solid;
}

1223 1224 1225
/* Media Queries */

@media (max-width: 700px) {
1226 1227 1228 1229
	body {
		padding-top: 0px;
	}

1230
	.rustdoc > .sidebar {
1231
		height: 45px;
1232
		min-height: 40px;
1233 1234 1235
		margin: 0;
		margin-left: -15px;
		padding: 0 15px;
1236
		position: static;
1237
		z-index: 11;
1238 1239
	}

1240
	.sidebar > .location {
1241 1242
		float: right;
		margin: 0px;
1243
		margin-top: 2px;
1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254
		padding: 3px 10px 1px 10px;
		min-height: 39px;
		background: inherit;
		text-align: left;
		font-size: 24px;
	}

	.sidebar .location:empty {
		padding: 0;
	}

G
Guillaume Gomez 已提交
1255
	.sidebar .logo-container {
1256
		width: 35px;
G
Guillaume Gomez 已提交
1257
		height: 35px;
1258
		margin-top: 5px;
1259
		margin-bottom: 5px;
1260
		float: left;
1261
		margin-left: 50px;
1262 1263
	}

G
Guillaume Gomez 已提交
1264 1265 1266 1267 1268
	.sidebar .logo-container > img {
		max-width: 35px;
		max-height: 35px;
	}

1269
	.sidebar-menu {
1270 1271
		position: fixed;
		z-index: 10;
1272 1273
		font-size: 2rem;
		cursor: pointer;
1274 1275 1276
		width: 45px;
		left: 0;
		text-align: center;
1277
		display: block;
1278 1279
		border-bottom: 1px solid;
		border-right: 1px solid;
G
Guillaume Gomez 已提交
1280
		height: 45px;
1281 1282
	}

1283 1284 1285 1286
	.rustdoc.source > .sidebar > .sidebar-menu {
		display: none;
	}

1287 1288 1289 1290 1291 1292 1293
	.sidebar-elems {
		position: fixed;
		z-index: 1;
		left: 0;
		top: 45px;
		bottom: 0;
		overflow-y: auto;
1294
		border-right: 1px solid;
1295 1296 1297
		display: none;
	}

1298 1299 1300 1301 1302
	.sidebar > .block.version {
		border-bottom: none;
		margin-top: 12px;
	}

1303
	nav.sub {
G
Guillaume Gomez 已提交
1304 1305
		width: calc(100% - 32px);
		float: right;
1306 1307
	}

1308 1309 1310 1311
	.content {
		margin-left: 0px;
	}

1312
	#main {
1313
		margin-top: 45px;
1314 1315 1316
		padding: 0;
	}

1317 1318 1319 1320
	.content .in-band {
		width: 100%;
	}

1321 1322
	.content h4 > .out-of-band {
		position: inherit;
1323 1324 1325 1326 1327 1328 1329 1330 1331
	}

	.toggle-wrapper > .collapse-toggle {
		left: 0px;
	}

	.toggle-wrapper {
		height: 1.5em;
	}
1332 1333 1334 1335

	#search {
		margin-left: 0;
	}
1336 1337 1338 1339

	.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
		display: flex;
	}
1340 1341

	.anchor {
1342
		display: none !important;
1343
	}
G
Guillaume Gomez 已提交
1344 1345 1346 1347

	h1.fqn {
		overflow: initial;
	}
1348

G
Guillaume Gomez 已提交
1349 1350 1351 1352
	.theme-picker {
		left: 10px;
		top: 54px;
		z-index: 1;
1353
	}
1354

1355 1356 1357 1358 1359
	h4 > .important-traits {
		position: absolute;
		left: -22px;
		top: 24px;
	}
G
Guillaume Gomez 已提交
1360 1361 1362 1363 1364 1365 1366 1367 1368

	#titles > div > div.count {
		float: left;
		width: 100%;
	}

	#titles {
		height: 50px;
	}
G
Guillaume Gomez 已提交
1369 1370 1371 1372 1373 1374 1375 1376

	.sidebar.mobile {
		position: fixed;
		width: 100%;
		margin-left: 0;
		background-color: rgba(0,0,0,0);
		height: 100%;
	}
G
Guillaume Gomez 已提交
1377 1378 1379
	.sidebar {
		width: calc(100% + 30px);
	}
G
Guillaume Gomez 已提交
1380 1381 1382

	.show-it {
		display: block;
1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400
		width: 246px;
	}

	.show-it > .block.items {
		margin: 8px 0;
	}

	.show-it > .block.items > ul {
		margin: 0;
	}

	.show-it > .block.items > ul > li {
		text-align: center;
		margin: 2px 0;
	}

	.show-it > .block.items > ul > li > a {
		font-size: 21px;
G
Guillaume Gomez 已提交
1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416
	}

	/* Because of ios, we need to actually have a full height sidebar title so the
	 * actual sidebar can show up. But then we need to make it transparent so we don't
	 * hide content. The filler just allows to create the background for the sidebar
	 * title. But because of the absolute position, I had to lower the z-index.
	 */
	#sidebar-filler {
		position: fixed;
		left: 45px;
		width: calc(100% - 45px);
		top: 0;
		height: 45px;
		z-index: -1;
		border-bottom: 1px solid;
	}
1417 1418

	.collapse-toggle {
1419 1420 1421 1422 1423
		left: -20px;
	}

	.impl > .collapse-toggle {
		left: -10px;
1424
	}
G
Guillaume Gomez 已提交
1425 1426 1427 1428

	#all-types {
		margin: 10px;
	}
1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440

	#sidebar-toggle {
		top: 100px;
		width: 30px;
		font-size: 1.5rem;
		text-align: center;
		padding: 0;
	}

	#source-sidebar {
		z-index: 11;
	}
G
Guillaume Gomez 已提交
1441 1442 1443 1444

	#main > .line-numbers {
		margin-top: 0;
	}
G
Guillaume Gomez 已提交
1445 1446
}

G
Guillaume Gomez 已提交
1447 1448 1449 1450 1451
@media print {
	nav.sub, .content .out-of-band, .collapse-toggle {
		display: none;
	}
}
G
Guillaume Gomez 已提交
1452 1453 1454 1455 1456 1457 1458 1459 1460

@media (max-width: 416px) {
	#titles {
		height: 73px;
	}

	#titles > div {
		height: 73px;
	}
1461 1462
}

1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475
.modal {
	position: fixed;
	width: 100vw;
	height: 100vh;
	z-index: 10000;
	top: 0;
	left: 0;
}

.modal-content {
	display: block;
	max-width: 60%;
	min-width: 200px;
1476 1477
	padding: 8px;
	top: 40%;
1478 1479
	position: absolute;
	left: 50%;
1480
	transform: translate(-50%, -40%);
G
Guillaume Gomez 已提交
1481
	border: 1px solid;
1482
	border-radius: 4px;
1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512
	border-top-right-radius: 0;
}

.modal-content > .docblock {
	margin: 0;
}

h3.important {
	margin: 0;
	margin-bottom: 13px;
	font-size: 19px;
}

.modal-content > .docblock > code.content {
	margin: 0;
	padding: 0;
	font-size: 20px;
}

.modal-content > .close {
	position: absolute;
	font-weight: 900;
	right: -25px;
	top: -1px;
	font-size: 18px;
	width: 25px;
	padding-right: 2px;
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
	text-align: center;
G
Guillaume Gomez 已提交
1513
	border: 1px solid;
1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529
	border-right: 0;
	cursor: pointer;
}

.modal-content > .whiter {
	height: 25px;
	position: absolute;
	width: 3px;
	right: -2px;
	top: 0px;
}

#main > div.important-traits {
	position: absolute;
	left: -24px;
	margin-top: 16px;
G
Guillaume Gomez 已提交
1530 1531
}

J
John Heitmann 已提交
1532
.content > .methods > .method > div.important-traits {
G
Guillaume Gomez 已提交
1533
	position: absolute;
J
John Heitmann 已提交
1534
	font-weight: 400;
G
Guillaume Gomez 已提交
1535 1536
	left: -42px;
	margin-top: 2px;
1537
}
1538 1539 1540 1541

kbd {
	display: inline-block;
	padding: 3px 5px;
J
Jon Gjengset 已提交
1542
	font: 15px monospace;
1543 1544
	line-height: 10px;
	vertical-align: middle;
1545
	border: solid 1px;
1546
	border-radius: 3px;
1547
	box-shadow: inset 0 -1px 0;
1548
	cursor: default;
1549
}
1550

1551 1552
.hidden-by-impl-hider,
.hidden-by-usual-hider {
1553 1554
	/* important because of conflicting rule for small screens */
	display: none !important;
1555
}
G
Guillaume Gomez 已提交
1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580

#implementations-list > h3 > span.in-band {
	width: 100%;
}

.table-display {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 16px;
}

.table-display tr td:first-child {
	padding-right: 0;
}

.table-display tr td:last-child {
	float: right;
}
.table-display .out-of-band {
	position: relative;
	font-size: 19px;
	display: block;
}
G
Guillaume Gomez 已提交
1581 1582 1583 1584 1585 1586 1587 1588 1589
#implementors-list > .impl-items .table-display .out-of-band {
	font-size: 17px;
}

.table-display td:hover .anchor {
	display: block;
	top: 2px;
	left: -5px;
}
1590 1591 1592 1593 1594 1595 1596

#main > ul {
	padding-left: 10px;
}
#main > ul > li {
	list-style: none;
}
1597 1598 1599 1600

.non-exhaustive {
	margin-bottom: 1em;
}
G
Guillaume Gomez 已提交
1601 1602 1603 1604 1605

div.children {
	padding-left: 27px;
	display: none;
}
G
Guillaume Gomez 已提交
1606 1607 1608 1609 1610
div.name {
	cursor: pointer;
	position: relative;
	margin-left: 16px;
}
G
Guillaume Gomez 已提交
1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622
div.files > a {
	display: block;
	padding: 0 3px;
}
div.files > a:hover, div.name:hover {
	background-color: #a14b4b;
}
div.name.expand + .children {
	display: block;
}
div.name::before {
	content: "\25B6";
G
Guillaume Gomez 已提交
1623
	padding-left: 4px;
G
Guillaume Gomez 已提交
1624
	font-size: 0.7em;
G
Guillaume Gomez 已提交
1625 1626 1627
	position: absolute;
	left: -16px;
	top: 4px;
G
Guillaume Gomez 已提交
1628 1629 1630
}
div.name.expand::before {
	transform: rotate(90deg);
G
Guillaume Gomez 已提交
1631 1632
	left: -15px;
	top: 2px;
G
Guillaume Gomez 已提交
1633
}
1634 1635

/* This part is to fix the "Expand attributes" part in the type declaration. */
1636
.type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1637 1638
	margin-left: 0 !important;
}
1639
.type-decl > pre > .docblock.attributes.top-attr {
1640 1641 1642 1643 1644 1645 1646 1647
	margin-left: 1.8em !important;
}
.type-decl > pre > .toggle-attributes {
	margin-left: 2.2em;
}
.type-decl > pre > .docblock.attributes {
	margin-left: 4em;
}