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 {
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; }
445 .content .item-list {
446 list-style-type: none;
450 .content .multi-column {
451 -moz-column-count: 5;
452 -moz-column-gap: 2.5em;
453 -webkit-column-count: 5;
454 -webkit-column-gap: 2.5em;
458 .content .multi-column li { width: 100%; display: inline-block; }
464 /* Shift "where ..." part of method or fn definition down a line */
465 .content .method .where,
467 .content .where.fmt-newline {
472 .content .methods > div:not(.important-traits) {
477 .content .docblock > .impl-items {
481 .content .docblock > .impl-items > h4 {
484 .content .docblock >.impl-items .table-display {
487 .content .docblock >.impl-items table td {
490 .toggle-wrapper.marg-left > .collapse-toggle {
493 .content .docblock > .impl-items .table-display, .impl-items table td {
497 .content .stability code {
501 .content .stability {
507 .sub-variant > div > .stability {
511 .content .stability::before {
519 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
523 .content .impl-items .docblock, .content .impl-items .stability {
527 .content .impl-items > .stability {
531 .methods > .stability, .content .impl-items > .stability {
544 border-bottom: 1px solid;
545 padding-bottom: 10px;
553 border-top: 1px solid;
554 border-bottom: 1px solid;
556 nav.main .separator {
558 display: inline-block;
562 nav.sum { text-align: right; }
563 nav.sub form { display: inline; }
570 text-decoration: none;
571 background: transparent;
574 .small-section-header:hover > .anchor {
578 .in-band:hover > .anchor {
579 display: inline-block;
590 .small-section-header > .anchor {
592 padding-right: 10px; /* avoid gap that causes hover to disappear */
595 content: '\2002\00a7\2002';
598 .docblock a:not(.srclink):not(.test-arrow):hover,
599 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
600 text-decoration: underline;
603 .invisible > .srclink, h4 > code + .srclink {
611 .block a.current.crate { font-weight: 500; }
616 .search-container > div {
617 display: inline-flex;
618 width: calc(100% - 34px);
626 border-radius: 4px 0 0 4px;
629 border-right: 1px solid;
630 -moz-appearance: none;
631 -webkit-appearance: none;
632 /* Removes default arrow from firefox */
635 background-repeat: no-repeat;
636 background-color: transparent;
637 background-size: 20px;
638 background-position: calc(100% - 1px) 56%;
640 .search-container > .top-button {
646 /* Override Normalize.css: we have margins and do
647 not want to overflow - the `moz` attribute is necessary
648 until Firefox 29, too early to drop at this point */
649 -moz-box-sizing: border-box !important;
650 box-sizing: border-box !important;
657 transition: border-color 300ms ease;
658 transition: border-radius 300ms ease-in-out;
659 transition: box-shadow 300ms ease-in-out;
663 #crate-search + .search-input {
664 border-radius: 0 1px 1px 0;
667 .search-input:focus {
671 box-shadow: 0 0 8px #078dd8;
674 .search-results .desc {
676 text-overflow: ellipsis;
685 .content .search-results td:first-child {
689 .content .search-results td:first-child a {
692 .content .search-results td:first-child a:after {
697 .content .search-results td:first-child a span {
701 tr.result span.primitive::after {
702 content: ' (primitive type)';
706 tr.result span.keyword::after {
707 content: ' (keyword)';
711 body.blur > :not(#help) {
713 -webkit-filter: blur(8px);
724 justify-content: center;
729 box-shadow: 0 0 6px rgba(0,0,0,.2);
739 #help dd { margin: 5px 35px; }
740 #help .infos { padding-left: 0; }
741 #help h1, #help h2 { margin-top: 0; }
771 display: inline-block;
777 vertical-align: text-bottom;
780 .module-item.unstable {
792 .impl-items .since, .impl .since {
799 .impl-items .srclink, .impl .srclink {
801 /* Override header settings otherwise it's too bold */
806 .impl-items code, .impl code {
810 .impl-items h4, h4.impl, h3.impl {
815 /* Push the src link out to the right edge consistently */
816 justify-content: space-between;
823 .variants_table tbody tr td:first-child {
824 width: 1%; /* make the variant name as small as possible */
835 pre.rust .question-mark {
840 display: inline-block;
842 padding: 5px 10px 5px 10px;
849 text-decoration: none;
852 .section-header:hover a:before {
855 padding-right: 10px; /* avoid gap that causes hover to disappear */
856 content: '\2002\00a7\2002';
859 .section-header:hover a {
860 text-decoration: none;
874 h3 > .collapse-toggle, h4 > .collapse-toggle {
879 .toggle-wrapper > .collapse-toggle {
889 .toggle-wrapper.collapsed {
891 transition: height .2s;
895 .collapse-toggle > .inner {
896 display: inline-block;
901 .collapse-toggle.hidden-default {
922 .toggle-wrapper > .collapse-toggle {
926 .variant + .toggle-wrapper + .docblock > p {
930 .sub-variant, .sub-variant > h3 {
931 margin-top: 1px !important;
934 #main > .sub-variant > h3 {
945 .sub-variant > div > span {
951 display: inline-block;
956 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
962 .docblock > .section-header:first-child {
967 .docblock > .section-header:first-child:hover > a:before {
971 .enum > .collapsed, .struct > .collapsed {
975 #main > .variant, #main > .structfield {
981 margin-top: 0px !important;
983 margin-bottom: 0px !important;
986 .toggle-attributes.collapsed {
989 .impl-items > .toggle-attributes {
992 .impl-items .attributes {
1002 @media (max-width: 700px) {
1007 .rustdoc > .sidebar {
1017 .sidebar > .location {
1021 padding: 3px 10px 1px 10px;
1023 background: inherit;
1028 .sidebar .location:empty {
1049 border-bottom: 1px solid;
1050 border-right: 1px solid;
1061 border-right: 1px solid;
1065 .sidebar > .block.version {
1066 border-bottom: none;
1071 width: calc(100% - 32px);
1088 .content h4 > .out-of-band {
1092 .toggle-wrapper > .collapse-toggle {
1104 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1109 display: none !important;
1118 nav.sub, .content .out-of-band, .collapse-toggle {
1132 display: inline-block;
1136 .tooltip .tooltiptext {
1148 .tooltip:hover .tooltiptext {
1152 .tooltip .tooltiptext::after {
1159 border-style: solid;
1162 .important-traits .tooltip .tooltiptext {
1177 .search-failed > ul {
1194 border-top: 2px solid;
1197 #titles > div:not(:last-child):not(.selected) {
1199 width: calc(33.3% - 1px);
1202 #titles > div > div.count {
1203 display: inline-block;
1212 h4 > .important-traits {
1222 margin-bottom: 10px;
1230 @media (max-width: 700px) {
1231 h4 > .important-traits {
1237 #titles > div > div.count {
1250 background-color: rgba(0,0,0,0);
1254 width: calc(100% + 30px);
1262 .show-it > .block.items {
1266 .show-it > .block.items > ul {
1270 .show-it > .block.items > ul > li {
1275 .show-it > .block.items > ul > li > a {
1279 /* Because of ios, we need to actually have a full height sidebar title so the
1280 * actual sidebar can show up. But then we need to make it transparent so we don't
1281 * hide content. The filler just allows to create the background for the sidebar
1282 * title. But because of the absolute position, I had to lower the z-index.
1287 width: calc(100% - 45px);
1291 border-bottom: 1px solid;
1298 .impl > .collapse-toggle {
1308 @media (max-width: 416px) {
1335 transform: translate(-50%, -40%);
1338 border-top-right-radius: 0;
1341 .modal-content > .docblock {
1347 margin-bottom: 13px;
1351 .modal-content > .docblock > code.content {
1357 .modal-content > .close {
1365 border-top-right-radius: 5px;
1366 border-bottom-right-radius: 5px;
1373 .modal-content > .whiter {
1381 #main > div.important-traits {
1387 .content > .methods > .method > div.important-traits {
1395 display: inline-block;
1397 font: 15px monospace;
1399 vertical-align: middle;
1402 box-shadow: inset 0 -1px 0;
1412 .theme-picker button {
1423 #theme-picker, #settings-menu {
1443 #theme-choices > button {
1448 background: rgba(0,0,0,0);
1451 #theme-choices > button:not(:first-child) {
1452 border-top: 1px solid;
1455 @media (max-width: 700px) {
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 {
1520 border-top-right-radius: 3px;
1521 border-bottom-right-radius: 3px;
1524 transition: left .5s;
1537 transition: left .5s;
1538 border-right: 1px solid;
1540 #source-sidebar > .title {
1543 border-bottom: 1px solid;
1560 div.files > a:hover, div.name:hover {
1561 background-color: #a14b4b;
1563 div.name.expand + .children {
1574 div.name.expand::before {
1575 transform: rotate(90deg);