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 /* This part handles the "default" theme being used depending on the system one. */
61 @media (prefers-color-scheme: light) {
66 @media (prefers-color-scheme: dark) {
72 /* General structure and fonts */
75 font: 16px/1.4 "Source Serif Pro", serif;
78 padding: 10px 15px 20px 15px;
80 -webkit-font-feature-settings: "kern", "liga";
81 -moz-font-feature-settings: "kern", "liga";
82 font-feature-settings: "kern", "liga";
94 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
96 margin: 20px 0 15px 0;
100 border-bottom: 1px dashed;
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;
106 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
113 h3.impl, h3.method, h3.type {
118 .sidebar, a.source, .search-input, .content table :not(code)>a,
119 .collapse-toggle, div.item-list .out-of-band,
120 #source-sidebar, #sidebar-toggle {
121 font-family: "Fira Sans", sans-serif;
127 ul ul, ol ul, ul ol, ol ol {
139 code, pre, a.test-arrow {
140 font-family: "Source Code Pro", monospace;
142 .docblock code, .docblock-short code {
146 .docblock pre code, .docblock-short pre code {
153 .source .content pre {
175 text-transform: uppercase;
187 .sidebar .block > ul > li {
195 /* Everything else */
198 display: none !important;
210 .logo-container > img {
216 transform: translate(-50%, -50%);
223 margin: 30px 10px 20px 10px;
225 word-wrap: break-word;
231 border-bottom: 1px solid;
232 overflow-wrap: break-word;
233 word-wrap: break-word; /* deprecated */
234 word-break: break-word; /* Chrome, non-standard */
241 .location a:first-child {
249 .block h2, .block h3 {
254 .block ul, .block li {
262 text-overflow: ellipsis;
268 transition: border 500ms ease-out;
272 border-top: 1px solid;
273 border-bottom: 1px solid;
296 .source .content pre.rust {
302 .rustdoc:not(.source) .example-wrap {
303 display: inline-flex;
312 .example-wrap > pre.line-number {
315 border-top-left-radius: 5px;
316 border-bottom-left-radius: 5px;
321 .rustdoc:not(.source) .example-wrap > pre.rust {
326 .rustdoc:not(.source) .example-wrap > pre {
347 .content pre.line-numbers {
352 -webkit-user-select: none;
353 -moz-user-select: none;
354 -ms-user-select: none;
365 .docblock-short.nowrap {
369 text-overflow: ellipsis;
374 text-overflow: ellipsis;
377 .docblock code, .docblock-short code {
378 white-space: pre-wrap;
381 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
382 border-bottom: 1px solid;
385 #main > .docblock h1 { font-size: 1.3em; }
386 #main > .docblock h2 { font-size: 1.15em; }
387 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
389 #main > h2 + div, #main > h2 + h3, #main > h3 + div {
390 display: none; /* Changed to flex or block via js once the page is loaded */
394 .docblock h1 { font-size: 1em; }
395 .docblock h2 { font-size: 0.95em; }
396 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
403 .content .out-of-band {
411 h3.impl > .out-of-band {
415 h4.method > .out-of-band {
419 h4 > code, h3 > code, .invisible > code {
420 max-width: calc(100% - 41px);
426 display: inline-block;
435 display: inline-block;
443 font-family: "Fira Sans", sans-serif;
446 .content table:not(.table-display) {
447 border-spacing: 0 5px;
449 .content td { vertical-align: top; }
450 .content td:first-child { padding-right: 20px; }
451 .content td p:first-child { margin-top: 0; }
452 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
453 .content tr:first-child td { border-top: 0; }
457 width: calc(100% - 2px);
476 .content .item-list {
477 list-style-type: none;
481 .content .multi-column {
482 -moz-column-count: 5;
483 -moz-column-gap: 2.5em;
484 -webkit-column-count: 5;
485 -webkit-column-gap: 2.5em;
489 .content .multi-column li { width: 100%; display: inline-block; }
495 /* Shift "where ..." part of method or fn definition down a line */
496 .content .method .where,
498 .content .where.fmt-newline {
503 .content .methods > div {
508 .content .docblock > .impl-items {
512 .content .docblock > .impl-items > h4 {
515 .content .docblock >.impl-items .table-display {
518 .content .docblock >.impl-items table td {
521 .toggle-wrapper.marg-left > .collapse-toggle {
524 .content .docblock > .impl-items .table-display, .impl-items table td {
528 .content .stability code {
532 .content .stability {
538 .sub-variant > div > .stability {
542 .content .stability::before {
550 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
554 .content .impl-items .docblock, .content .impl-items .stability {
558 .content .impl-items > .stability {
562 .methods > .stability, .content .impl-items > .stability {
575 border-bottom: 1px solid;
576 padding-bottom: 10px;
584 border-top: 1px solid;
585 border-bottom: 1px solid;
587 nav.main .separator {
589 display: inline-block;
593 nav.sum { text-align: right; }
594 nav.sub form { display: inline; }
601 text-decoration: none;
602 background: transparent;
605 .small-section-header:hover > .anchor {
609 .in-band:hover > .anchor {
610 display: inline-block;
621 .small-section-header > .anchor {
623 padding-right: 10px; /* avoid gap that causes hover to disappear */
626 content: '\2002\00a7\2002';
629 .docblock a:not(.srclink):not(.test-arrow):hover,
630 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
631 text-decoration: underline;
634 .invisible > .srclink, h4 > code + .srclink {
642 .block a.current.crate { font-weight: 500; }
647 .search-container > div {
648 display: inline-flex;
649 width: calc(100% - 34px);
658 border-radius: 4px 0 0 4px;
661 border-right: 1px solid;
662 -moz-appearance: none;
663 -webkit-appearance: none;
664 /* Removes default arrow from firefox */
667 background-repeat: no-repeat;
668 background-color: transparent;
669 background-size: 20px;
670 background-position: calc(100% - 1px) 56%;
672 .search-container > .top-button {
678 /* Override Normalize.css: we have margins and do
679 not want to overflow - the `moz` attribute is necessary
680 until Firefox 29, too early to drop at this point */
681 -moz-box-sizing: border-box !important;
682 box-sizing: border-box !important;
689 transition: border-color 300ms ease;
690 transition: border-radius 300ms ease-in-out;
691 transition: box-shadow 300ms ease-in-out;
695 #crate-search + .search-input {
696 border-radius: 0 1px 1px 0;
697 width: calc(100% - 32px);
700 .search-input:focus {
706 .search-results .desc {
708 text-overflow: ellipsis;
717 .content .search-results td:first-child {
721 .content .search-results td:first-child a {
724 .content .search-results td:first-child a:after {
729 .content .search-results td:first-child a span {
733 tr.result span.primitive::after {
734 content: ' (primitive type)';
738 tr.result span.keyword::after {
739 content: ' (keyword)';
743 body.blur > :not(#help) {
745 -webkit-filter: blur(8px);
756 justify-content: center;
761 box-shadow: 0 0 6px rgba(0,0,0,.2);
771 #help dd { margin: 5px 35px; }
772 #help .infos { padding-left: 0; }
773 #help h1, #help h2 { margin-top: 0; }
803 display: inline-block;
809 vertical-align: text-bottom;
812 .module-item.unstable {
824 .impl-items .since, .impl .since {
831 .impl-items .srclink, .impl .srclink {
833 /* Override header settings otherwise it's too bold */
838 .impl-items code, .impl code {
842 .impl-items h4, h4.impl, h3.impl {
847 /* Push the src link out to the right edge consistently */
848 justify-content: space-between;
855 .variants_table tbody tr td:first-child {
856 width: 1%; /* make the variant name as small as possible */
867 pre.rust .question-mark {
872 display: inline-block;
874 padding: 5px 10px 5px 10px;
882 text-decoration: none;
885 .section-header:hover a:before {
888 padding-right: 10px; /* avoid gap that causes hover to disappear */
889 content: '\2002\00a7\2002';
892 .section-header:hover a {
893 text-decoration: none;
907 h3 > .collapse-toggle, h4 > .collapse-toggle {
912 .toggle-wrapper > .collapse-toggle {
922 .toggle-wrapper.collapsed {
924 transition: height .2s;
928 .collapse-toggle > .inner {
929 display: inline-block;
934 .collapse-toggle.hidden-default {
949 .out-of-band > span.since {
955 .toggle-wrapper > .collapse-toggle {
959 .variant + .toggle-wrapper + .docblock > p {
963 .sub-variant, .sub-variant > h3 {
964 margin-top: 1px !important;
967 #main > .sub-variant > h3 {
978 .sub-variant > div > span {
984 display: inline-block;
989 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
995 .docblock > .section-header:first-child {
1000 .docblock > .section-header:first-child:hover > a:before {
1004 .enum > .collapsed, .struct > .collapsed {
1005 margin-bottom: 25px;
1008 #main > .variant, #main > .structfield {
1014 margin-top: 0px !important;
1016 margin-bottom: 0px !important;
1019 .toggle-attributes.collapsed {
1022 .impl-items > .toggle-attributes {
1025 .impl-items .attributes {
1042 display: inline-block;
1046 .tooltip .tooltiptext {
1058 .tooltip:hover .tooltiptext {
1062 .tooltip .tooltiptext::after {
1069 border-style: solid;
1072 .tooltip .tooltiptext {
1087 .search-failed > ul {
1104 border-top: 2px solid;
1107 #titles > div:not(:last-child) {
1109 width: calc(33.3% - 1px);
1112 #titles > div > div.count {
1113 display: inline-block;
1121 margin-bottom: 10px;
1135 border-top-right-radius: 3px;
1136 border-bottom-right-radius: 3px;
1139 transition: left .5s;
1152 transition: left .5s;
1153 border-right: 1px solid;
1155 #source-sidebar > .title {
1158 border-bottom: 1px solid;
1168 .theme-picker button {
1179 #theme-picker, #settings-menu {
1199 #theme-choices > button {
1204 background: rgba(0,0,0,0);
1207 #theme-choices > button:not(:first-child) {
1208 border-top: 1px solid;
1213 @media (max-width: 700px) {
1218 .rustdoc > .sidebar {
1228 .sidebar > .location {
1232 padding: 3px 10px 1px 10px;
1234 background: inherit;
1239 .sidebar .location:empty {
1243 .sidebar .logo-container {
1252 .sidebar .logo-container > img {
1266 border-bottom: 1px solid;
1267 border-right: 1px solid;
1271 .rustdoc.source > .sidebar > .sidebar-menu {
1282 border-right: 1px solid;
1286 .sidebar > .block.version {
1287 border-bottom: none;
1292 width: calc(100% - 32px);
1309 .content h4 > .out-of-band {
1313 .toggle-wrapper > .collapse-toggle {
1325 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1330 display: none !important;
1343 #titles > div > div.count {
1356 background-color: rgba(0,0,0,0);
1360 width: calc(100% + 30px);
1368 .show-it > .block.items {
1372 .show-it > .block.items > ul {
1376 .show-it > .block.items > ul > li {
1381 .show-it > .block.items > ul > li > a {
1385 /* Because of ios, we need to actually have a full height sidebar title so the
1386 * actual sidebar can show up. But then we need to make it transparent so we don't
1387 * hide content. The filler just allows to create the background for the sidebar
1388 * title. But because of the absolute position, I had to lower the z-index.
1393 width: calc(100% - 45px);
1397 border-bottom: 1px solid;
1404 .impl > .collapse-toggle {
1424 #main > .line-numbers {
1430 nav.sub, .content .out-of-band, .collapse-toggle {
1435 @media (max-width: 416px) {
1447 margin-bottom: 13px;
1452 display: inline-block;
1454 font: 15px monospace;
1456 vertical-align: middle;
1459 box-shadow: inset 0 -1px 0;
1463 .hidden-by-impl-hider,
1464 .hidden-by-usual-hider {
1465 /* important because of conflicting rule for small screens */
1466 display: none !important;
1469 #implementations-list > h3 > span.in-band {
1476 border-collapse: collapse;
1481 .table-display tr td:first-child {
1485 .table-display tr td:last-child {
1488 .table-display .out-of-band {
1493 #implementors-list > .impl-items .table-display .out-of-band {
1497 .table-display td:hover .anchor {
1527 div.files > a:hover, div.name:hover {
1528 background-color: #a14b4b;
1530 div.name.expand + .children {
1541 div.name.expand::before {
1542 transform: rotate(90deg);
1547 /* This part is to fix the "Expand attributes" part in the type declaration. */
1548 .type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1549 margin-left: 0 !important;
1551 .type-decl > pre > .docblock.attributes.top-attr {
1552 margin-left: 1.8em !important;
1554 .type-decl > pre > .toggle-attributes {
1557 .type-decl > pre > .docblock.attributes {