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.ttf.woff") format('woff');
45 font-family: 'Source Code Pro';
48 src: url("SourceCodePro-It.ttf.woff") format('woff');
51 font-family: 'Source Code Pro';
54 src: url("SourceCodePro-Semibold.ttf.woff") format('woff');
58 -webkit-box-sizing: border-box;
59 -moz-box-sizing: border-box;
60 box-sizing: border-box;
63 /* This part handles the "default" theme being used depending on the system one. */
67 @media (prefers-color-scheme: light) {
72 @media (prefers-color-scheme: dark) {
78 /* General structure and fonts */
81 font: 16px/1.4 "Source Serif Pro", serif;
84 padding: 10px 15px 20px 15px;
86 -webkit-font-feature-settings: "kern", "liga";
87 -moz-font-feature-settings: "kern", "liga";
88 font-feature-settings: "kern", "liga";
100 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
102 margin: 20px 0 15px 0;
106 border-bottom: 1px dashed;
109 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
110 border-bottom: 1px solid;
112 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
119 h3.impl, h3.method, h3.type {
124 .sidebar, a.source, .search-input, .content table :not(code)>a,
125 .collapse-toggle, div.item-list .out-of-band,
126 #source-sidebar, #sidebar-toggle {
127 font-family: "Fira Sans", sans-serif;
133 ul ul, ol ul, ul ol, ol ol {
146 font-family: "Source Code Pro", monospace;
148 .docblock code, .docblock-short code {
152 .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
155 .docblock code.spotlight :last-child {
156 padding-bottom: 0.6em;
162 .source .content pre {
184 text-transform: uppercase;
196 .sidebar .block > ul > li {
204 /* Everything else */
207 display: none !important;
219 .logo-container > img {
225 transform: translate(-50%, -50%);
232 margin: 30px 10px 20px 10px;
234 word-wrap: break-word;
240 border-bottom: 1px solid;
241 overflow-wrap: break-word;
242 word-wrap: break-word; /* deprecated */
243 word-break: break-word; /* Chrome, non-standard */
250 .location a:first-child {
258 .block h2, .block h3 {
263 .block ul, .block li {
271 text-overflow: ellipsis;
277 transition: border 500ms ease-out;
281 border-top: 1px solid;
282 border-bottom: 1px solid;
305 .source .content pre.rust {
311 .rustdoc:not(.source) .example-wrap {
312 display: inline-flex;
320 .example-wrap > pre.line-number {
323 border-top-left-radius: 5px;
324 border-bottom-left-radius: 5px;
329 .rustdoc:not(.source) .example-wrap > pre.rust {
334 .rustdoc:not(.source) .example-wrap > pre {
355 .content pre.line-numbers {
360 -webkit-user-select: none;
361 -moz-user-select: none;
362 -ms-user-select: none;
373 .docblock-short.nowrap {
377 text-overflow: ellipsis;
382 text-overflow: ellipsis;
385 .docblock-short code {
386 white-space: pre-wrap;
389 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
390 border-bottom: 1px solid;
393 #main > .docblock h1 { font-size: 1.3em; }
394 #main > .docblock h2 { font-size: 1.15em; }
395 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
397 #main > h2 + div, #main > h2 + h3, #main > h3 + div {
398 display: none; /* Changed to flex or block via js once the page is loaded */
402 .docblock h1 { font-size: 1em; }
403 .docblock h2 { font-size: 0.95em; }
404 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
411 .content .out-of-band {
419 h3.impl > .out-of-band {
423 h4.method > .out-of-band {
427 h4 > code, h3 > code, .invisible > code {
428 max-width: calc(100% - 41px);
434 display: inline-block;
443 display: inline-block;
451 font-family: "Fira Sans", sans-serif;
454 .content table:not(.table-display) {
455 border-spacing: 0 5px;
457 .content td { vertical-align: top; }
458 .content td:first-child { padding-right: 20px; }
459 .content td p:first-child { margin-top: 0; }
460 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
461 .content tr:first-child td { border-top: 0; }
465 width: calc(100% - 2px);
484 .content .item-list {
485 list-style-type: none;
489 .content .multi-column {
490 -moz-column-count: 5;
491 -moz-column-gap: 2.5em;
492 -webkit-column-count: 5;
493 -webkit-column-gap: 2.5em;
497 .content .multi-column li { width: 100%; display: inline-block; }
503 /* Shift "where ..." part of method or fn definition down a line */
504 .content .method .where,
506 .content .where.fmt-newline {
511 .content .methods > div:not(.important-traits) {
516 .content .docblock > .impl-items {
520 .content .docblock > .impl-items > h4 {
523 .content .docblock >.impl-items .table-display {
526 .content .docblock >.impl-items table td {
529 .toggle-wrapper.marg-left > .collapse-toggle {
532 .content .docblock > .impl-items .table-display, .impl-items table td {
536 .content .stability code {
540 .content .stability {
546 .sub-variant > div > .stability {
550 .content .stability::before {
558 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
562 .content .impl-items .docblock, .content .impl-items .stability {
566 .content .impl-items > .stability {
570 .methods > .stability, .content .impl-items > .stability {
583 border-bottom: 1px solid;
584 padding-bottom: 10px;
592 border-top: 1px solid;
593 border-bottom: 1px solid;
595 nav.main .separator {
597 display: inline-block;
601 nav.sum { text-align: right; }
602 nav.sub form { display: inline; }
609 text-decoration: none;
610 background: transparent;
613 .small-section-header:hover > .anchor {
617 .in-band:hover > .anchor {
618 display: inline-block;
629 .small-section-header > .anchor {
631 padding-right: 10px; /* avoid gap that causes hover to disappear */
634 content: '\2002\00a7\2002';
637 .docblock a:not(.srclink):not(.test-arrow):hover,
638 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
639 text-decoration: underline;
642 .invisible > .srclink, h4 > code + .srclink {
650 .block a.current.crate { font-weight: 500; }
655 .search-container > div {
656 display: inline-flex;
657 width: calc(100% - 34px);
666 border-radius: 4px 0 0 4px;
669 border-right: 1px solid;
670 -moz-appearance: none;
671 -webkit-appearance: none;
672 /* Removes default arrow from firefox */
675 background-repeat: no-repeat;
676 background-color: transparent;
677 background-size: 20px;
678 background-position: calc(100% - 1px) 56%;
680 .search-container > .top-button {
686 /* Override Normalize.css: we have margins and do
687 not want to overflow - the `moz` attribute is necessary
688 until Firefox 29, too early to drop at this point */
689 -moz-box-sizing: border-box !important;
690 box-sizing: border-box !important;
697 transition: border-color 300ms ease;
698 transition: border-radius 300ms ease-in-out;
699 transition: box-shadow 300ms ease-in-out;
703 #crate-search + .search-input {
704 border-radius: 0 1px 1px 0;
705 width: calc(100% - 32px);
708 .search-input:focus {
714 .search-results .desc {
716 text-overflow: ellipsis;
725 .content .search-results td:first-child {
729 .content .search-results td:first-child a {
732 .content .search-results td:first-child a:after {
737 .content .search-results td:first-child a span {
741 tr.result span.primitive::after {
742 content: ' (primitive type)';
746 tr.result span.keyword::after {
747 content: ' (keyword)';
751 body.blur > :not(#help) {
753 -webkit-filter: blur(8px);
764 justify-content: center;
769 box-shadow: 0 0 6px rgba(0,0,0,.2);
779 #help dd { margin: 5px 35px; }
780 #help .infos { padding-left: 0; }
781 #help h1, #help h2 { margin-top: 0; }
811 display: inline-block;
817 vertical-align: text-bottom;
820 .module-item.unstable {
832 .impl-items .since, .impl .since {
839 .impl-items .srclink, .impl .srclink {
841 /* Override header settings otherwise it's too bold */
846 .impl-items code, .impl code {
850 .impl-items h4, h4.impl, h3.impl {
855 /* Push the src link out to the right edge consistently */
856 justify-content: space-between;
863 .variants_table tbody tr td:first-child {
864 width: 1%; /* make the variant name as small as possible */
875 pre.rust .question-mark {
880 display: inline-block;
882 padding: 5px 10px 5px 10px;
889 text-decoration: none;
892 .section-header:hover a:before {
895 padding-right: 10px; /* avoid gap that causes hover to disappear */
896 content: '\2002\00a7\2002';
899 .section-header:hover a {
900 text-decoration: none;
914 h3 > .collapse-toggle, h4 > .collapse-toggle {
919 .toggle-wrapper > .collapse-toggle {
929 .toggle-wrapper.collapsed {
931 transition: height .2s;
935 .collapse-toggle > .inner {
936 display: inline-block;
941 .collapse-toggle.hidden-default {
956 .out-of-band > span.since {
962 .toggle-wrapper > .collapse-toggle {
966 .variant + .toggle-wrapper + .docblock > p {
970 .sub-variant, .sub-variant > h3 {
971 margin-top: 1px !important;
974 #main > .sub-variant > h3 {
985 .sub-variant > div > span {
991 display: inline-block;
996 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
1002 .docblock > .section-header:first-child {
1007 .docblock > .section-header:first-child:hover > a:before {
1011 .enum > .collapsed, .struct > .collapsed {
1012 margin-bottom: 25px;
1015 #main > .variant, #main > .structfield {
1021 margin-top: 0px !important;
1023 margin-bottom: 0px !important;
1026 .toggle-attributes.collapsed {
1029 .impl-items > .toggle-attributes {
1032 .impl-items .attributes {
1049 display: inline-block;
1053 .tooltip .tooltiptext {
1065 .tooltip:hover .tooltiptext {
1069 .tooltip .tooltiptext::after {
1076 border-style: solid;
1079 .important-traits .tooltip .tooltiptext {
1094 .search-failed > ul {
1111 border-top: 2px solid;
1114 #titles > div:not(:last-child) {
1116 width: calc(33.3% - 1px);
1119 #titles > div > div.count {
1120 display: inline-block;
1129 h4 > .important-traits {
1139 margin-bottom: 10px;
1153 border-top-right-radius: 3px;
1154 border-bottom-right-radius: 3px;
1157 transition: left .5s;
1170 transition: left .5s;
1171 border-right: 1px solid;
1173 #source-sidebar > .title {
1176 border-bottom: 1px solid;
1186 .theme-picker button {
1197 #theme-picker, #settings-menu {
1217 #theme-choices > button {
1222 background: rgba(0,0,0,0);
1225 #theme-choices > button:not(:first-child) {
1226 border-top: 1px solid;
1231 @media (max-width: 700px) {
1236 .rustdoc > .sidebar {
1246 .sidebar > .location {
1250 padding: 3px 10px 1px 10px;
1252 background: inherit;
1257 .sidebar .location:empty {
1261 .sidebar .logo-container {
1270 .sidebar .logo-container > img {
1284 border-bottom: 1px solid;
1285 border-right: 1px solid;
1289 .rustdoc.source > .sidebar > .sidebar-menu {
1300 border-right: 1px solid;
1304 .sidebar > .block.version {
1305 border-bottom: none;
1310 width: calc(100% - 32px);
1327 .content h4 > .out-of-band {
1331 .toggle-wrapper > .collapse-toggle {
1343 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1348 display: none !important;
1361 h4 > .important-traits {
1367 #titles > div > div.count {
1380 background-color: rgba(0,0,0,0);
1384 width: calc(100% + 30px);
1392 .show-it > .block.items {
1396 .show-it > .block.items > ul {
1400 .show-it > .block.items > ul > li {
1405 .show-it > .block.items > ul > li > a {
1409 /* Because of ios, we need to actually have a full height sidebar title so the
1410 * actual sidebar can show up. But then we need to make it transparent so we don't
1411 * hide content. The filler just allows to create the background for the sidebar
1412 * title. But because of the absolute position, I had to lower the z-index.
1417 width: calc(100% - 45px);
1421 border-bottom: 1px solid;
1428 .impl > .collapse-toggle {
1448 #main > .line-numbers {
1454 nav.sub, .content .out-of-band, .collapse-toggle {
1459 @media (max-width: 416px) {
1486 transform: translate(-50%, -40%);
1489 border-top-right-radius: 0;
1492 .modal-content > .docblock {
1498 margin-bottom: 13px;
1502 .modal-content > .docblock > code.content {
1508 .modal-content > .close {
1516 border-top-right-radius: 5px;
1517 border-bottom-right-radius: 5px;
1524 .modal-content > .whiter {
1532 #main > div.important-traits {
1538 .content > .methods > .method > div.important-traits {
1546 display: inline-block;
1548 font: 15px monospace;
1550 vertical-align: middle;
1553 box-shadow: inset 0 -1px 0;
1557 .hidden-by-impl-hider,
1558 .hidden-by-usual-hider {
1559 /* important because of conflicting rule for small screens */
1560 display: none !important;
1563 #implementations-list > h3 > span.in-band {
1570 border-collapse: collapse;
1575 .table-display tr td:first-child {
1579 .table-display tr td:last-child {
1582 .table-display .out-of-band {
1587 #implementors-list > .impl-items .table-display .out-of-band {
1591 .table-display td:hover .anchor {
1621 div.files > a:hover, div.name:hover {
1622 background-color: #a14b4b;
1624 div.name.expand + .children {
1635 div.name.expand::before {
1636 transform: rotate(90deg);
1641 /* This part is to fix the "Expand attributes" part in the type declaration. */
1642 .type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1643 margin-left: 0 !important;
1645 .type-decl > pre > .docblock.attributes.top-attr {
1646 margin-left: 1.8em !important;
1648 .type-decl > pre > .toggle-attributes {
1651 .type-decl > pre > .docblock.attributes {