2 * Copyright 2013 The Rust Project Developers. See the COPYRIGHT
3 * file at the top-level directory of this distribution and at
4 * http://rust-lang.org/COPYRIGHT.
6 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 * option. This file may not be copied, modified, or distributed
10 * except according to those terms.
13 /* See FiraSans-LICENSE.txt for the Fira Sans license. */
15 font-family: 'Fira Sans';
18 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
21 font-family: 'Fira Sans';
24 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
27 /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license and
28 * Heuristica-LICENSE.txt for the Heuristica license. */
30 font-family: 'Source Serif Pro';
33 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
36 font-family: 'Source Serif Pro';
39 src: url("Heuristica-Italic.woff") format('woff');
42 font-family: 'Source Serif Pro';
45 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
48 /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
50 font-family: 'Source Code Pro';
53 /* Avoid using locally installed font because bad versions are in circulation:
54 * see https://github.com/rust-lang/rust/issues/24355 */
55 src: url("SourceCodePro-Regular.woff") format('woff');
58 font-family: 'Source Code Pro';
61 src: url("SourceCodePro-Semibold.woff") format('woff');
65 -webkit-box-sizing: border-box;
66 -moz-box-sizing: border-box;
67 box-sizing: border-box;
70 /* General structure and fonts */
73 font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
76 padding: 10px 15px 20px 15px;
78 -webkit-font-feature-settings: "kern", "liga";
79 -moz-font-feature-settings: "kern", "liga";
80 font-feature-settings: "kern", "liga";
92 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
94 margin: 20px 0 15px 0;
98 border-bottom: 1px dashed;
101 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
102 border-bottom: 1px solid;
104 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
110 h3.impl, h3.method, h3.type {
115 .sidebar, a.source, .search-input, .content table :not(code)>a,
116 .collapse-toggle, div.item-list .out-of-band {
117 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
123 ul ul, ol ul, ul ol, ol ol {
136 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
137 white-space: pre-wrap;
139 .docblock code, .docblock-short code {
143 .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
146 .docblock code.spotlight :last-child {
147 padding-bottom: 0.6em;
153 .source .content pre {
171 text-transform: uppercase;
183 .sidebar .block > ul > li {
191 /* Everything else */
194 display: none !important;
206 margin: 30px 10px 20px 10px;
208 word-wrap: break-word;
214 border-bottom: 1px solid;
215 overflow-wrap: break-word;
216 word-wrap: break-word; /* deprecated */
217 word-break: break-word; /* Chrome, non-standard */
224 .location a:first-child {
232 .block h2, .block h3 {
237 .block ul, .block li {
245 text-overflow: ellipsis;
251 transition: border 500ms ease-out;
255 border-top: 1px solid;
256 border-bottom: 1px solid;
279 .source .content pre.rust {
286 display: inline-flex;
290 .example-wrap > pre.line-number {
293 border-top-left-radius: 5px;
294 border-bottom-left-radius: 5px;
299 .example-wrap > pre.rust {
320 .content pre.line-numbers {
325 -webkit-user-select: none;
326 -moz-user-select: none;
327 -ms-user-select: none;
338 .docblock-short.nowrap {
342 text-overflow: ellipsis;
347 text-overflow: ellipsis;
350 .docblock-short code {
354 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
355 border-bottom: 1px solid;
358 #main > .docblock h1 { font-size: 1.3em; }
359 #main > .docblock h2 { font-size: 1.15em; }
360 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
362 .docblock h1 { font-size: 1em; }
363 .docblock h2 { font-size: 0.95em; }
364 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
371 .content .out-of-band {
379 h3.impl > .out-of-band {
383 h4.method > .out-of-band {
387 h4 > code, h3 > code, .invisible > code {
388 max-width: calc(100% - 41px);
398 display: inline-block;
407 display: inline-block;
415 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
418 .content table:not(.table-display) {
419 border-spacing: 0 5px;
421 .content td { vertical-align: top; }
422 .content td:first-child { padding-right: 20px; }
423 .content td p:first-child { margin-top: 0; }
424 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
425 .content tr:first-child td { border-top: 0; }
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 .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
482 .content .impl-items .docblock, .content .impl-items .stability {
486 .content .impl-items > .stability {
490 .content .docblock > .impl-items {
494 .content .docblock > .impl-items > h4 {
497 .content .docblock >.impl-items .table-display {
500 .content .docblock >.impl-items table td {
503 .toggle-wrapper.marg-left > .collapse-toggle {
506 .content .docblock > .impl-items .table-display, .impl-items table td {
510 .content .stability code {
514 .content .stability {
520 .sub-variant > div > .stability {
524 .content .stability::before {
531 .methods > .stability {
540 border-bottom: 1px solid;
541 padding-bottom: 10px;
549 border-top: 1px solid;
550 border-bottom: 1px solid;
552 nav.main .separator {
554 display: inline-block;
558 nav.sum { text-align: right; }
559 nav.sub form { display: inline; }
566 text-decoration: none;
567 background: transparent;
570 .small-section-header:hover > .anchor {
574 .in-band:hover > .anchor {
575 display: inline-block;
586 .small-section-header > .anchor {
588 padding-right: 10px; /* avoid gap that causes hover to disappear */
591 content: '\2002\00a7\2002';
594 .docblock a:not(.srclink):not(.test-arrow):hover,
595 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
596 text-decoration: underline;
599 .invisible > .srclink {
607 .block a.current.crate { font-weight: 500; }
612 .search-container > .top-button {
618 width: calc(100% - 34px);
619 /* Override Normalize.css: we have margins and do
620 not want to overflow - the `moz` attribute is necessary
621 until Firefox 29, too early to drop at this point */
622 -moz-box-sizing: border-box !important;
623 box-sizing: border-box !important;
630 transition: border-color 300ms ease;
631 transition: border-radius 300ms ease-in-out;
632 transition: box-shadow 300ms ease-in-out;
635 .search-input:focus {
639 box-shadow: 0 0 8px #078dd8;
642 .search-results .desc {
644 text-overflow: ellipsis;
653 .content .search-results td:first-child {
657 .content .search-results td:first-child a {
660 .content .search-results td:first-child a:after {
665 .content .search-results td:first-child a span {
669 tr.result span.primitive::after {
670 content: ' (primitive type)';
674 tr.result span.keyword::after {
675 content: ' (keyword)';
679 body.blur > :not(#help) {
681 -webkit-filter: blur(8px);
692 justify-content: center;
697 box-shadow: 0 0 6px rgba(0,0,0,.2);
707 #help dd { margin: 5px 35px; }
708 #help .infos { padding-left: 0; }
709 #help h1, #help h2 { margin-top: 0; }
742 background: inherit !important;
745 .module-item.unstable {
761 .variants_table tbody tr td:first-child {
762 width: 1%; /* make the variant name as small as possible */
773 pre.rust .question-mark {
778 display: inline-block;
780 padding: 5px 10px 5px 10px;
787 text-decoration: none;
790 .section-header:hover a:before {
793 padding-right: 10px; /* avoid gap that causes hover to disappear */
794 content: '\2002\00a7\2002';
797 .section-header:hover a {
798 text-decoration: none;
812 h3 > .collapse-toggle, h4 > .collapse-toggle {
817 .toggle-wrapper > .collapse-toggle {
827 .toggle-wrapper.collapsed {
829 transition: height .2s;
833 .collapse-toggle > .inner {
834 display: inline-block;
864 .toggle-wrapper > .collapse-toggle {
868 .variant + .toggle-wrapper + .docblock > p {
872 .sub-variant, .sub-variant > h3 {
873 margin-top: 1px !important;
876 #main > .sub-variant > h3 {
887 .sub-variant > div > span {
893 display: inline-block;
898 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
904 .docblock > .section-header:first-child {
909 .docblock > .section-header:first-child:hover > a:before {
913 .enum > .collapsed, .struct > .collapsed {
917 #main > .variant, #main > .structfield {
923 margin-top: 0px !important;
925 margin-bottom: 0px !important;
928 .toggle-attributes.collapsed {
931 .impl-items > .toggle-attributes {
934 .impl-items .attributes {
944 @media (max-width: 700px) {
959 .sidebar > .location {
963 padding: 3px 10px 1px 10px;
970 .sidebar .location:empty {
991 border-bottom: 1px solid;
992 border-right: 1px solid;
1003 border-right: 1px solid;
1007 .sidebar > .block.version {
1008 border-bottom: none;
1013 width: calc(100% - 32px);
1030 .content h4 > .out-of-band {
1034 .toggle-wrapper > .collapse-toggle {
1046 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1051 display: none !important;
1060 nav.sub, .content .out-of-band, .collapse-toggle {
1074 display: inline-block;
1078 .tooltip .tooltiptext {
1090 .tooltip:hover .tooltiptext {
1094 .tooltip .tooltiptext::after {
1101 border-style: solid;
1104 .important-traits .tooltip .tooltiptext {
1129 border-top: 2px solid;
1132 #titles > div:not(:last-child):not(.selected) {
1134 width: calc(33.3% - 1px);
1137 #titles > div > div.count {
1138 display: inline-block;
1147 h4 > .important-traits {
1157 margin-bottom: 10px;
1165 @media (max-width: 700px) {
1166 h4 > .important-traits {
1172 #titles > div > div.count {
1185 background-color: rgba(0,0,0,0);
1189 width: calc(100% + 30px);
1197 .show-it > .block.items {
1201 .show-it > .block.items > ul {
1205 .show-it > .block.items > ul > li {
1210 .show-it > .block.items > ul > li > a {
1214 /* Because of ios, we need to actually have a full height sidebar title so the
1215 * actual sidebar can show up. But then we need to make it transparent so we don't
1216 * hide content. The filler just allows to create the background for the sidebar
1217 * title. But because of the absolute position, I had to lower the z-index.
1222 width: calc(100% - 45px);
1226 border-bottom: 1px solid;
1233 .impl > .collapse-toggle {
1243 @media (max-width: 416px) {
1270 transform: translate(-50%, -40%);
1273 border-top-right-radius: 0;
1276 .modal-content > .docblock {
1282 margin-bottom: 13px;
1286 .modal-content > .docblock > code.content {
1292 .modal-content > .close {
1300 border-top-right-radius: 5px;
1301 border-bottom-right-radius: 5px;
1308 .modal-content > .whiter {
1316 #main > div.important-traits {
1322 .content > .methods > div.important-traits {
1329 display: inline-block;
1331 font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1333 vertical-align: middle;
1336 box-shadow: inset 0 -1px 0;
1346 .theme-picker button {
1357 #theme-picker, #settings-menu {
1377 #theme-choices > button {
1382 background: rgba(0,0,0,0);
1385 #theme-choices > button:not(:first-child) {
1386 border-top: 1px solid;
1389 @media (max-width: 700px) {
1397 .hidden-by-impl-hider,
1398 .hidden-by-usual-hider {
1399 /* important because of conflicting rule for small screens */
1400 display: none !important;
1403 #implementations-list > h3 > span.in-band {
1410 border-collapse: collapse;
1415 .table-display tr td:first-child {
1419 .table-display tr td:last-child {
1422 .table-display .out-of-band {
1427 #implementors-list > .impl-items .table-display .out-of-band {
1431 .table-display td:hover .anchor {