1 /* See FiraSans-LICENSE.txt for the Fira Sans license. */
3 font-family: 'Fira Sans';
6 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
9 font-family: 'Fira Sans';
12 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
15 /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */
17 font-family: 'Source Serif Pro';
20 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff');
23 font-family: 'Source Serif Pro';
26 src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff');
29 font-family: 'Source Serif Pro';
32 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff');
35 /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
37 font-family: 'Source Code Pro';
40 /* Avoid using locally installed font because bad versions are in circulation:
41 * see https://github.com/rust-lang/rust/issues/24355 */
42 src: url("SourceCodePro-Regular.woff") format('woff');
45 font-family: 'Source Code Pro';
48 src: url("SourceCodePro-Semibold.woff") format('woff');
52 -webkit-box-sizing: border-box;
53 -moz-box-sizing: border-box;
54 box-sizing: border-box;
57 /* General structure and fonts */
60 font: 16px/1.4 "Source Serif Pro", serif;
63 padding: 10px 15px 20px 15px;
65 -webkit-font-feature-settings: "kern", "liga";
66 -moz-font-feature-settings: "kern", "liga";
67 font-feature-settings: "kern", "liga";
79 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
81 margin: 20px 0 15px 0;
85 border-bottom: 1px dashed;
88 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
89 border-bottom: 1px solid;
91 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
98 h3.impl, h3.method, h3.type {
103 .sidebar, a.source, .search-input, .content table :not(code)>a,
104 .collapse-toggle, div.item-list .out-of-band,
105 #source-sidebar, #sidebar-toggle {
106 font-family: "Fira Sans", sans-serif;
112 ul ul, ol ul, ul ol, ol ol {
125 font-family: "Source Code Pro", monospace;
127 .docblock code, .docblock-short code {
131 .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
134 .docblock code.spotlight :last-child {
135 padding-bottom: 0.6em;
141 .source .content pre {
159 text-transform: uppercase;
171 .sidebar .block > ul > li {
179 /* Everything else */
182 display: none !important;
194 margin: 30px 10px 20px 10px;
196 word-wrap: break-word;
202 border-bottom: 1px solid;
203 overflow-wrap: break-word;
204 word-wrap: break-word; /* deprecated */
205 word-break: break-word; /* Chrome, non-standard */
212 .location a:first-child {
220 .block h2, .block h3 {
225 .block ul, .block li {
233 text-overflow: ellipsis;
239 transition: border 500ms ease-out;
243 border-top: 1px solid;
244 border-bottom: 1px solid;
267 .source .content pre.rust {
273 .rustdoc:not(.source) .example-wrap {
274 display: inline-flex;
282 .example-wrap > pre.line-number {
285 border-top-left-radius: 5px;
286 border-bottom-left-radius: 5px;
291 .rustdoc:not(.source) .example-wrap > pre.rust {
296 .rustdoc:not(.source) .example-wrap > pre {
317 .content pre.line-numbers {
322 -webkit-user-select: none;
323 -moz-user-select: none;
324 -ms-user-select: none;
335 .docblock-short.nowrap {
339 text-overflow: ellipsis;
344 text-overflow: ellipsis;
347 .docblock-short code {
348 white-space: pre-wrap;
351 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
352 border-bottom: 1px solid;
355 #main > .docblock h1 { font-size: 1.3em; }
356 #main > .docblock h2 { font-size: 1.15em; }
357 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
359 #main > h2 + div, #main > h2 + h3, #main > h3 + div {
360 display: none; /* Changed to flex or block via js once the page is loaded */
364 .docblock h1 { font-size: 1em; }
365 .docblock h2 { font-size: 0.95em; }
366 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
373 .content .out-of-band {
381 h3.impl > .out-of-band {
385 h4.method > .out-of-band {
389 h4 > code, h3 > code, .invisible > code {
390 max-width: calc(100% - 41px);
396 display: inline-block;
405 display: inline-block;
413 font-family: "Fira Sans", sans-serif;
416 .content table:not(.table-display) {
417 border-spacing: 0 5px;
419 .content td { vertical-align: top; }
420 .content td:first-child { padding-right: 20px; }
421 .content td p:first-child { margin-top: 0; }
422 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
423 .content tr:first-child td { border-top: 0; }
427 width: calc(100% - 2px);
446 .content .item-list {
447 list-style-type: none;
451 .content .multi-column {
452 -moz-column-count: 5;
453 -moz-column-gap: 2.5em;
454 -webkit-column-count: 5;
455 -webkit-column-gap: 2.5em;
459 .content .multi-column li { width: 100%; display: inline-block; }
465 /* Shift "where ..." part of method or fn definition down a line */
466 .content .method .where,
468 .content .where.fmt-newline {
473 .content .methods > div:not(.important-traits) {
478 .content .docblock > .impl-items {
482 .content .docblock > .impl-items > h4 {
485 .content .docblock >.impl-items .table-display {
488 .content .docblock >.impl-items table td {
491 .toggle-wrapper.marg-left > .collapse-toggle {
494 .content .docblock > .impl-items .table-display, .impl-items table td {
498 .content .stability code {
502 .content .stability {
508 .sub-variant > div > .stability {
512 .content .stability::before {
520 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
524 .content .impl-items .docblock, .content .impl-items .stability {
528 .content .impl-items > .stability {
532 .methods > .stability, .content .impl-items > .stability {
545 border-bottom: 1px solid;
546 padding-bottom: 10px;
554 border-top: 1px solid;
555 border-bottom: 1px solid;
557 nav.main .separator {
559 display: inline-block;
563 nav.sum { text-align: right; }
564 nav.sub form { display: inline; }
571 text-decoration: none;
572 background: transparent;
575 .small-section-header:hover > .anchor {
579 .in-band:hover > .anchor {
580 display: inline-block;
591 .small-section-header > .anchor {
593 padding-right: 10px; /* avoid gap that causes hover to disappear */
596 content: '\2002\00a7\2002';
599 .docblock a:not(.srclink):not(.test-arrow):hover,
600 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
601 text-decoration: underline;
604 .invisible > .srclink, h4 > code + .srclink {
612 .block a.current.crate { font-weight: 500; }
617 .search-container > div {
618 display: inline-flex;
619 width: calc(100% - 34px);
627 border-radius: 4px 0 0 4px;
630 border-right: 1px solid;
631 -moz-appearance: none;
632 -webkit-appearance: none;
633 /* Removes default arrow from firefox */
636 background-repeat: no-repeat;
637 background-color: transparent;
638 background-size: 20px;
639 background-position: calc(100% - 1px) 56%;
641 .search-container > .top-button {
647 /* Override Normalize.css: we have margins and do
648 not want to overflow - the `moz` attribute is necessary
649 until Firefox 29, too early to drop at this point */
650 -moz-box-sizing: border-box !important;
651 box-sizing: border-box !important;
658 transition: border-color 300ms ease;
659 transition: border-radius 300ms ease-in-out;
660 transition: box-shadow 300ms ease-in-out;
661 width: calc(100% - 32px);
664 #crate-search + .search-input {
665 border-radius: 0 1px 1px 0;
668 .search-input:focus {
672 box-shadow: 0 0 8px #078dd8;
675 .search-results .desc {
677 text-overflow: ellipsis;
686 .content .search-results td:first-child {
690 .content .search-results td:first-child a {
693 .content .search-results td:first-child a:after {
698 .content .search-results td:first-child a span {
702 tr.result span.primitive::after {
703 content: ' (primitive type)';
707 tr.result span.keyword::after {
708 content: ' (keyword)';
712 body.blur > :not(#help) {
714 -webkit-filter: blur(8px);
725 justify-content: center;
730 box-shadow: 0 0 6px rgba(0,0,0,.2);
740 #help dd { margin: 5px 35px; }
741 #help .infos { padding-left: 0; }
742 #help h1, #help h2 { margin-top: 0; }
772 display: inline-block;
778 vertical-align: text-bottom;
781 .module-item.unstable {
793 .impl-items .since, .impl .since {
800 .impl-items .srclink, .impl .srclink {
802 /* Override header settings otherwise it's too bold */
807 .impl-items code, .impl code {
811 .impl-items h4, h4.impl, h3.impl {
816 /* Push the src link out to the right edge consistently */
817 justify-content: space-between;
824 .variants_table tbody tr td:first-child {
825 width: 1%; /* make the variant name as small as possible */
836 pre.rust .question-mark {
841 display: inline-block;
843 padding: 5px 10px 5px 10px;
850 text-decoration: none;
853 .section-header:hover a:before {
856 padding-right: 10px; /* avoid gap that causes hover to disappear */
857 content: '\2002\00a7\2002';
860 .section-header:hover a {
861 text-decoration: none;
875 h3 > .collapse-toggle, h4 > .collapse-toggle {
880 .toggle-wrapper > .collapse-toggle {
890 .toggle-wrapper.collapsed {
892 transition: height .2s;
896 .collapse-toggle > .inner {
897 display: inline-block;
902 .collapse-toggle.hidden-default {
917 .out-of-band > span.since {
923 .toggle-wrapper > .collapse-toggle {
927 .variant + .toggle-wrapper + .docblock > p {
931 .sub-variant, .sub-variant > h3 {
932 margin-top: 1px !important;
935 #main > .sub-variant > h3 {
946 .sub-variant > div > span {
952 display: inline-block;
957 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
963 .docblock > .section-header:first-child {
968 .docblock > .section-header:first-child:hover > a:before {
972 .enum > .collapsed, .struct > .collapsed {
976 #main > .variant, #main > .structfield {
982 margin-top: 0px !important;
984 margin-bottom: 0px !important;
987 .toggle-attributes.collapsed {
990 .impl-items > .toggle-attributes {
993 .impl-items .attributes {
1003 @media (max-width: 700px) {
1008 .rustdoc > .sidebar {
1018 .sidebar > .location {
1022 padding: 3px 10px 1px 10px;
1024 background: inherit;
1029 .sidebar .location:empty {
1050 border-bottom: 1px solid;
1051 border-right: 1px solid;
1062 border-right: 1px solid;
1066 .sidebar > .block.version {
1067 border-bottom: none;
1072 width: calc(100% - 32px);
1089 .content h4 > .out-of-band {
1093 .toggle-wrapper > .collapse-toggle {
1105 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1110 display: none !important;
1117 #main > .line-numbers {
1123 nav.sub, .content .out-of-band, .collapse-toggle {
1137 display: inline-block;
1141 .tooltip .tooltiptext {
1153 .tooltip:hover .tooltiptext {
1157 .tooltip .tooltiptext::after {
1164 border-style: solid;
1167 .important-traits .tooltip .tooltiptext {
1182 .search-failed > ul {
1199 border-top: 2px solid;
1202 #titles > div:not(:last-child) {
1204 width: calc(33.3% - 1px);
1207 #titles > div > div.count {
1208 display: inline-block;
1217 h4 > .important-traits {
1227 margin-bottom: 10px;
1235 @media (max-width: 700px) {
1236 h4 > .important-traits {
1242 #titles > div > div.count {
1255 background-color: rgba(0,0,0,0);
1259 width: calc(100% + 30px);
1267 .show-it > .block.items {
1271 .show-it > .block.items > ul {
1275 .show-it > .block.items > ul > li {
1280 .show-it > .block.items > ul > li > a {
1284 /* Because of ios, we need to actually have a full height sidebar title so the
1285 * actual sidebar can show up. But then we need to make it transparent so we don't
1286 * hide content. The filler just allows to create the background for the sidebar
1287 * title. But because of the absolute position, I had to lower the z-index.
1292 width: calc(100% - 45px);
1296 border-bottom: 1px solid;
1303 .impl > .collapse-toggle {
1313 @media (max-width: 416px) {
1340 transform: translate(-50%, -40%);
1343 border-top-right-radius: 0;
1346 .modal-content > .docblock {
1352 margin-bottom: 13px;
1356 .modal-content > .docblock > code.content {
1362 .modal-content > .close {
1370 border-top-right-radius: 5px;
1371 border-bottom-right-radius: 5px;
1378 .modal-content > .whiter {
1386 #main > div.important-traits {
1392 .content > .methods > .method > div.important-traits {
1400 display: inline-block;
1402 font: 15px monospace;
1404 vertical-align: middle;
1407 box-shadow: inset 0 -1px 0;
1417 .theme-picker button {
1428 #theme-picker, #settings-menu {
1448 #theme-choices > button {
1453 background: rgba(0,0,0,0);
1456 #theme-choices > button:not(:first-child) {
1457 border-top: 1px solid;
1460 @media (max-width: 700px) {
1468 .hidden-by-impl-hider,
1469 .hidden-by-usual-hider {
1470 /* important because of conflicting rule for small screens */
1471 display: none !important;
1474 #implementations-list > h3 > span.in-band {
1481 border-collapse: collapse;
1486 .table-display tr td:first-child {
1490 .table-display tr td:last-child {
1493 .table-display .out-of-band {
1498 #implementors-list > .impl-items .table-display .out-of-band {
1502 .table-display td:hover .anchor {
1525 border-top-right-radius: 3px;
1526 border-bottom-right-radius: 3px;
1529 transition: left .5s;
1542 transition: left .5s;
1543 border-right: 1px solid;
1545 #source-sidebar > .title {
1548 border-bottom: 1px solid;
1565 div.files > a:hover, div.name:hover {
1566 background-color: #a14b4b;
1568 div.name.expand + .children {
1579 div.name.expand::before {
1580 transform: rotate(90deg);
1585 /* This part is to fix the "Expand attributes" part in the type declaration. */
1586 .type-decl > pre > :first-child {
1587 margin-left: 0 !important;
1589 .type-decl > pre > :nth-child(2) {
1590 margin-left: 1.8em !important;
1592 .type-decl > pre > .toggle-attributes {
1595 .type-decl > pre > .docblock.attributes {