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;
172 .sidebar .block > ul > li {
180 /* Everything else */
183 display: none !important;
195 margin: 30px 10px 20px 10px;
197 word-wrap: break-word;
203 border-bottom: 1px solid;
204 overflow-wrap: break-word;
205 word-wrap: break-word; /* deprecated */
206 word-break: break-word; /* Chrome, non-standard */
213 .location a:first-child {
221 .block h2, .block h3 {
226 .block ul, .block li {
234 text-overflow: ellipsis;
240 transition: border 500ms ease-out;
244 border-top: 1px solid;
245 border-bottom: 1px solid;
268 .source .content pre.rust {
274 .rustdoc:not(.source) .example-wrap {
275 display: inline-flex;
283 .example-wrap > pre.line-number {
286 border-top-left-radius: 5px;
287 border-bottom-left-radius: 5px;
292 .rustdoc:not(.source) .example-wrap > pre.rust {
297 .rustdoc:not(.source) .example-wrap > pre {
318 .content pre.line-numbers {
323 -webkit-user-select: none;
324 -moz-user-select: none;
325 -ms-user-select: none;
336 .docblock-short.nowrap {
340 text-overflow: ellipsis;
345 text-overflow: ellipsis;
348 .docblock-short code {
349 white-space: pre-wrap;
352 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
353 border-bottom: 1px solid;
356 #main > .docblock h1 { font-size: 1.3em; }
357 #main > .docblock h2 { font-size: 1.15em; }
358 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
360 #main > h2 + div, #main > h2 + h3, #main > h3 + div {
361 display: none; /* Changed to flex or block via js once the page is loaded */
365 .docblock h1 { font-size: 1em; }
366 .docblock h2 { font-size: 0.95em; }
367 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
374 .content .out-of-band {
382 h3.impl > .out-of-band {
386 h4.method > .out-of-band {
390 h4 > code, h3 > code, .invisible > code {
391 max-width: calc(100% - 41px);
397 display: inline-block;
406 display: inline-block;
414 font-family: "Fira Sans", sans-serif;
417 .content table:not(.table-display) {
418 border-spacing: 0 5px;
420 .content td { vertical-align: top; }
421 .content td:first-child { padding-right: 20px; }
422 .content td p:first-child { margin-top: 0; }
423 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
424 .content tr:first-child td { border-top: 0; }
428 width: calc(100% - 2px);
447 .content .item-list {
448 list-style-type: none;
452 .content .multi-column {
453 -moz-column-count: 5;
454 -moz-column-gap: 2.5em;
455 -webkit-column-count: 5;
456 -webkit-column-gap: 2.5em;
460 .content .multi-column li { width: 100%; display: inline-block; }
466 /* Shift "where ..." part of method or fn definition down a line */
467 .content .method .where,
469 .content .where.fmt-newline {
474 .content .methods > div:not(.important-traits) {
479 .content .docblock > .impl-items {
483 .content .docblock > .impl-items > h4 {
486 .content .docblock >.impl-items .table-display {
489 .content .docblock >.impl-items table td {
492 .toggle-wrapper.marg-left > .collapse-toggle {
495 .content .docblock > .impl-items .table-display, .impl-items table td {
499 .content .stability code {
503 .content .stability {
509 .sub-variant > div > .stability {
513 .content .stability::before {
521 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
525 .content .impl-items .docblock, .content .impl-items .stability {
529 .content .impl-items > .stability {
533 .methods > .stability, .content .impl-items > .stability {
546 border-bottom: 1px solid;
547 padding-bottom: 10px;
555 border-top: 1px solid;
556 border-bottom: 1px solid;
558 nav.main .separator {
560 display: inline-block;
564 nav.sum { text-align: right; }
565 nav.sub form { display: inline; }
572 text-decoration: none;
573 background: transparent;
576 .small-section-header:hover > .anchor {
580 .in-band:hover > .anchor {
581 display: inline-block;
592 .small-section-header > .anchor {
594 padding-right: 10px; /* avoid gap that causes hover to disappear */
597 content: '\2002\00a7\2002';
600 .docblock a:not(.srclink):not(.test-arrow):hover,
601 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
602 text-decoration: underline;
605 .invisible > .srclink, h4 > code + .srclink {
613 .block a.current.crate { font-weight: 500; }
618 .search-container > div {
619 display: inline-flex;
620 width: calc(100% - 34px);
628 border-radius: 4px 0 0 4px;
631 border-right: 1px solid;
632 -moz-appearance: none;
633 -webkit-appearance: none;
634 /* Removes default arrow from firefox */
637 background-repeat: no-repeat;
638 background-color: transparent;
639 background-size: 20px;
640 background-position: calc(100% - 1px) 56%;
642 .search-container > .top-button {
648 /* Override Normalize.css: we have margins and do
649 not want to overflow - the `moz` attribute is necessary
650 until Firefox 29, too early to drop at this point */
651 -moz-box-sizing: border-box !important;
652 box-sizing: border-box !important;
659 transition: border-color 300ms ease;
660 transition: border-radius 300ms ease-in-out;
661 transition: box-shadow 300ms ease-in-out;
662 width: calc(100% - 32px);
665 #crate-search + .search-input {
666 border-radius: 0 1px 1px 0;
669 .search-input:focus {
673 box-shadow: 0 0 8px #078dd8;
676 .search-results .desc {
678 text-overflow: ellipsis;
687 .content .search-results td:first-child {
691 .content .search-results td:first-child a {
694 .content .search-results td:first-child a:after {
699 .content .search-results td:first-child a span {
703 tr.result span.primitive::after {
704 content: ' (primitive type)';
708 tr.result span.keyword::after {
709 content: ' (keyword)';
713 body.blur > :not(#help) {
715 -webkit-filter: blur(8px);
726 justify-content: center;
731 box-shadow: 0 0 6px rgba(0,0,0,.2);
741 #help dd { margin: 5px 35px; }
742 #help .infos { padding-left: 0; }
743 #help h1, #help h2 { margin-top: 0; }
773 display: inline-block;
779 vertical-align: text-bottom;
782 .module-item.unstable {
794 .impl-items .since, .impl .since {
801 .impl-items .srclink, .impl .srclink {
803 /* Override header settings otherwise it's too bold */
808 .impl-items code, .impl code {
812 .impl-items h4, h4.impl, h3.impl {
817 /* Push the src link out to the right edge consistently */
818 justify-content: space-between;
825 .variants_table tbody tr td:first-child {
826 width: 1%; /* make the variant name as small as possible */
837 pre.rust .question-mark {
842 display: inline-block;
844 padding: 5px 10px 5px 10px;
851 text-decoration: none;
854 .section-header:hover a:before {
857 padding-right: 10px; /* avoid gap that causes hover to disappear */
858 content: '\2002\00a7\2002';
861 .section-header:hover a {
862 text-decoration: none;
876 h3 > .collapse-toggle, h4 > .collapse-toggle {
881 .toggle-wrapper > .collapse-toggle {
891 .toggle-wrapper.collapsed {
893 transition: height .2s;
897 .collapse-toggle > .inner {
898 display: inline-block;
903 .collapse-toggle.hidden-default {
924 .toggle-wrapper > .collapse-toggle {
928 .variant + .toggle-wrapper + .docblock > p {
932 .sub-variant, .sub-variant > h3 {
933 margin-top: 1px !important;
936 #main > .sub-variant > h3 {
947 .sub-variant > div > span {
953 display: inline-block;
958 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
964 .docblock > .section-header:first-child {
969 .docblock > .section-header:first-child:hover > a:before {
973 .enum > .collapsed, .struct > .collapsed {
977 #main > .variant, #main > .structfield {
983 margin-top: 0px !important;
985 margin-bottom: 0px !important;
988 .toggle-attributes.collapsed {
991 .impl-items > .toggle-attributes {
994 .impl-items .attributes {
1004 @media (max-width: 700px) {
1009 .rustdoc > .sidebar {
1019 .sidebar > .location {
1023 padding: 3px 10px 1px 10px;
1025 background: inherit;
1030 .sidebar .location:empty {
1051 border-bottom: 1px solid;
1052 border-right: 1px solid;
1063 border-right: 1px solid;
1067 .sidebar > .block.version {
1068 border-bottom: none;
1073 width: calc(100% - 32px);
1090 .content h4 > .out-of-band {
1094 .toggle-wrapper > .collapse-toggle {
1106 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1111 display: none !important;
1120 nav.sub, .content .out-of-band, .collapse-toggle {
1134 display: inline-block;
1138 .tooltip .tooltiptext {
1150 .tooltip:hover .tooltiptext {
1154 .tooltip .tooltiptext::after {
1161 border-style: solid;
1164 .important-traits .tooltip .tooltiptext {
1179 .search-failed > ul {
1196 border-top: 2px solid;
1199 #titles > div:not(:last-child) {
1201 width: calc(33.3% - 1px);
1204 #titles > div > div.count {
1205 display: inline-block;
1214 h4 > .important-traits {
1224 margin-bottom: 10px;
1232 @media (max-width: 700px) {
1233 h4 > .important-traits {
1239 #titles > div > div.count {
1252 background-color: rgba(0,0,0,0);
1256 width: calc(100% + 30px);
1264 .show-it > .block.items {
1268 .show-it > .block.items > ul {
1272 .show-it > .block.items > ul > li {
1277 .show-it > .block.items > ul > li > a {
1281 /* Because of ios, we need to actually have a full height sidebar title so the
1282 * actual sidebar can show up. But then we need to make it transparent so we don't
1283 * hide content. The filler just allows to create the background for the sidebar
1284 * title. But because of the absolute position, I had to lower the z-index.
1289 width: calc(100% - 45px);
1293 border-bottom: 1px solid;
1300 .impl > .collapse-toggle {
1310 @media (max-width: 416px) {
1337 transform: translate(-50%, -40%);
1340 border-top-right-radius: 0;
1343 .modal-content > .docblock {
1349 margin-bottom: 13px;
1353 .modal-content > .docblock > code.content {
1359 .modal-content > .close {
1367 border-top-right-radius: 5px;
1368 border-bottom-right-radius: 5px;
1375 .modal-content > .whiter {
1383 #main > div.important-traits {
1389 .content > .methods > .method > div.important-traits {
1397 display: inline-block;
1399 font: 15px monospace;
1401 vertical-align: middle;
1404 box-shadow: inset 0 -1px 0;
1414 .theme-picker button {
1425 #theme-picker, #settings-menu {
1445 #theme-choices > button {
1450 background: rgba(0,0,0,0);
1453 #theme-choices > button:not(:first-child) {
1454 border-top: 1px solid;
1457 @media (max-width: 700px) {
1465 .hidden-by-impl-hider,
1466 .hidden-by-usual-hider {
1467 /* important because of conflicting rule for small screens */
1468 display: none !important;
1471 #implementations-list > h3 > span.in-band {
1478 border-collapse: collapse;
1483 .table-display tr td:first-child {
1487 .table-display tr td:last-child {
1490 .table-display .out-of-band {
1495 #implementors-list > .impl-items .table-display .out-of-band {
1499 .table-display td:hover .anchor {
1522 border-top-right-radius: 3px;
1523 border-bottom-right-radius: 3px;
1526 transition: left .5s;
1539 transition: left .5s;
1540 border-right: 1px solid;
1542 #source-sidebar > .title {
1545 border-bottom: 1px solid;
1562 div.files > a:hover, div.name:hover {
1563 background-color: #a14b4b;
1565 div.name.expand + .children {
1576 div.name.expand::before {
1577 transform: rotate(90deg);
1582 /* This part is to fix the "Expand attributes" part in the type declaration. */
1583 .type-decl > pre > :first-child {
1584 margin-left: 0 !important;
1586 .type-decl > pre > :nth-child(2) {
1587 margin-left: 1.8em !important;
1589 .type-decl > pre > .toggle-attributes {
1592 .type-decl > pre > .docblock.attributes {