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 {
302 .content pre.line-numbers {
307 -webkit-user-select: none;
308 -moz-user-select: none;
309 -ms-user-select: none;
320 .docblock-short.nowrap {
324 text-overflow: ellipsis;
329 text-overflow: ellipsis;
332 .docblock-short code {
336 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
337 border-bottom: 1px solid;
340 #main > .docblock h1 { font-size: 1.3em; }
341 #main > .docblock h2 { font-size: 1.15em; }
342 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
344 .docblock h1 { font-size: 1em; }
345 .docblock h2 { font-size: 0.95em; }
346 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
353 .content .out-of-band {
361 h3.impl > .out-of-band {
365 h4.method > .out-of-band {
369 h4 > code, h3 > code, .invisible > code {
370 max-width: calc(100% - 41px);
380 display: inline-block;
389 display: inline-block;
397 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
400 .content table:not(.table-display) {
401 border-spacing: 0 5px;
403 .content td { vertical-align: top; }
404 .content td:first-child { padding-right: 20px; }
405 .content td p:first-child { margin-top: 0; }
406 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
407 .content tr:first-child td { border-top: 0; }
429 .content .item-list {
430 list-style-type: none;
434 .content .multi-column {
435 -moz-column-count: 5;
436 -moz-column-gap: 2.5em;
437 -webkit-column-count: 5;
438 -webkit-column-gap: 2.5em;
442 .content .multi-column li { width: 100%; display: inline-block; }
448 /* Shift "where ..." part of method or fn definition down a line */
449 .content .method .where,
451 .content .where.fmt-newline {
456 .content .methods > div:not(.important-traits) {
461 .content .docblock > .impl-items {
465 .content .docblock > .impl-items > h4 {
468 .content .docblock >.impl-items .table-display {
471 .content .docblock >.impl-items table td {
474 .toggle-wrapper.marg-left > .collapse-toggle {
477 .content .docblock > .impl-items .table-display, .impl-items table td {
481 .content .stability code {
485 .content .stability {
491 .content .stability::before {
499 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
503 .content .impl-items .docblock, .content .impl-items .stability {
507 .content .impl-items > .stability {
511 .methods > .stability, .content .impl-items > .stability {
520 border-bottom: 1px solid;
521 padding-bottom: 10px;
529 border-top: 1px solid;
530 border-bottom: 1px solid;
532 nav.main .separator {
534 display: inline-block;
538 nav.sum { text-align: right; }
539 nav.sub form { display: inline; }
546 text-decoration: none;
547 background: transparent;
550 .small-section-header:hover > .anchor {
554 .in-band:hover > .anchor {
555 display: inline-block;
566 .small-section-header > .anchor {
568 padding-right: 10px; /* avoid gap that causes hover to disappear */
571 content: '\2002\00a7\2002';
574 .docblock a:not(.srclink):not(.test-arrow):hover,
575 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
576 text-decoration: underline;
579 .invisible > .srclink {
587 .block a.current.crate { font-weight: 500; }
592 .search-container > .top-button {
598 width: calc(100% - 34px);
599 /* Override Normalize.css: we have margins and do
600 not want to overflow - the `moz` attribute is necessary
601 until Firefox 29, too early to drop at this point */
602 -moz-box-sizing: border-box !important;
603 box-sizing: border-box !important;
610 transition: border-color 300ms ease;
611 transition: border-radius 300ms ease-in-out;
612 transition: box-shadow 300ms ease-in-out;
615 .search-input:focus {
619 box-shadow: 0 0 8px #078dd8;
622 .search-results .desc {
624 text-overflow: ellipsis;
633 .content .search-results td:first-child {
637 .content .search-results td:first-child a {
640 .content .search-results td:first-child a:after {
645 .content .search-results td:first-child a span {
649 tr.result span.primitive::after {
650 content: ' (primitive type)';
654 tr.result span.keyword::after {
655 content: ' (keyword)';
659 body.blur > :not(#help) {
661 -webkit-filter: blur(8px);
672 justify-content: center;
677 box-shadow: 0 0 6px rgba(0,0,0,.2);
687 #help dd { margin: 5px 35px; }
688 #help .infos { padding-left: 0; }
689 #help h1, #help h2 { margin-top: 0; }
722 background: inherit !important;
725 .module-item.unstable {
741 .variants_table tbody tr td:first-child {
742 width: 1%; /* make the variant name as small as possible */
753 pre.rust .question-mark {
758 display: inline-block;
760 padding: 5px 10px 5px 10px;
767 text-decoration: none;
770 .section-header:hover a:before {
773 padding-right: 10px; /* avoid gap that causes hover to disappear */
774 content: '\2002\00a7\2002';
777 .section-header:hover a {
778 text-decoration: none;
792 h3 > .collapse-toggle, h4 > .collapse-toggle {
797 .toggle-wrapper > .collapse-toggle {
807 .toggle-wrapper.collapsed {
809 transition: height .2s;
813 .collapse-toggle > .inner {
814 display: inline-block;
844 .toggle-wrapper > .collapse-toggle {
848 .variant + .toggle-wrapper + .docblock > p {
852 .sub-variant, .sub-variant > h3 {
853 margin-top: 0 !important;
857 display: inline-block;
862 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
868 .docblock > .section-header:first-child {
873 .docblock > .section-header:first-child:hover > a:before {
877 .enum > .collapsed, .struct > .collapsed {
881 #main > .variant, #main > .structfield {
887 margin-top: 0px !important;
889 margin-bottom: 0px !important;
892 .toggle-attributes.collapsed {
895 .impl-items > .toggle-attributes {
898 .impl-items .attributes {
908 @media (max-width: 700px) {
923 .sidebar > .location {
927 padding: 3px 10px 1px 10px;
934 .sidebar .location:empty {
955 border-bottom: 1px solid;
956 border-right: 1px solid;
967 border-right: 1px solid;
971 .sidebar > .block.version {
977 width: calc(100% - 32px);
994 .content h4 > .out-of-band {
998 .toggle-wrapper > .collapse-toggle {
1010 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1015 display: none !important;
1024 nav.sub, .content .out-of-band, .collapse-toggle {
1038 display: inline-block;
1042 .tooltip .tooltiptext {
1054 .tooltip:hover .tooltiptext {
1058 .tooltip .tooltiptext::after {
1065 border-style: solid;
1068 .important-traits .tooltip .tooltiptext {
1091 border-bottom: 1px solid;
1096 #titles > div.selected {
1097 border-bottom: 3px solid;
1100 #titles > div:hover {
1101 border-bottom: 3px solid;
1104 #titles > div > div.count {
1105 display: inline-block;
1114 h4 > .important-traits {
1124 margin-bottom: 10px;
1132 @media (max-width: 700px) {
1133 h4 > .important-traits {
1139 #titles > div > div.count {
1152 background-color: rgba(0,0,0,0);
1156 width: calc(100% + 30px);
1164 .show-it > .block.items {
1168 .show-it > .block.items > ul {
1172 .show-it > .block.items > ul > li {
1177 .show-it > .block.items > ul > li > a {
1181 /* Because of ios, we need to actually have a full height sidebar title so the
1182 * actual sidebar can show up. But then we need to make it transparent so we don't
1183 * hide content. The filler just allows to create the background for the sidebar
1184 * title. But because of the absolute position, I had to lower the z-index.
1189 width: calc(100% - 45px);
1193 border-bottom: 1px solid;
1200 .impl > .collapse-toggle {
1210 @media (max-width: 416px) {
1237 transform: translate(-50%, -40%);
1240 border-top-right-radius: 0;
1243 .modal-content > .docblock {
1249 margin-bottom: 13px;
1253 .modal-content > .docblock > code.content {
1259 .modal-content > .close {
1267 border-top-right-radius: 5px;
1268 border-bottom-right-radius: 5px;
1275 .modal-content > .whiter {
1283 #main > div.important-traits {
1289 .content > .methods > div.important-traits {
1296 display: inline-block;
1298 font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1300 vertical-align: middle;
1303 box-shadow: inset 0 -1px 0;
1313 .theme-picker button {
1324 #theme-picker, #settings-menu {
1344 #theme-choices > button {
1349 background: rgba(0,0,0,0);
1352 #theme-choices > button:not(:first-child) {
1353 border-top: 1px solid;
1356 @media (max-width: 700px) {
1364 .hidden-by-impl-hider,
1365 .hidden-by-usual-hider {
1366 /* important because of conflicting rule for small screens */
1367 display: none !important;
1370 #implementations-list > h3 > span.in-band {
1377 border-collapse: collapse;
1382 .table-display tr td:first-child {
1386 .table-display tr td:last-child {
1389 .table-display .out-of-band {
1394 #implementors-list > .impl-items .table-display .out-of-band {
1398 .table-display td:hover .anchor {