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;
102 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
103 border-bottom: 1px solid;
105 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
111 h3.impl, h3.method, h3.type {
116 .sidebar, a.source, .search-input, .content table :not(code)>a,
117 .collapse-toggle, ul.item-list > li > .out-of-band {
118 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
124 ul ul, ol ul, ul ol, ol ol {
137 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
138 white-space: pre-wrap;
140 .docblock code, .docblock-short code {
144 .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
147 .docblock code.spotlight :last-child {
148 padding-bottom: 0.6em;
154 .source .content pre {
172 text-transform: uppercase;
184 .sidebar .block > ul > li {
192 /* Everything else */
195 display: none !important;
207 margin: 30px 10px 20px 10px;
209 word-wrap: break-word;
215 border-bottom: 1px solid;
216 overflow-wrap: break-word;
217 word-wrap: break-word; /* deprecated */
218 word-break: break-word; /* Chrome, non-standard */
225 .location a:first-child {
233 .block h2, .block h3 {
238 .block ul, .block li {
246 text-overflow: ellipsis;
252 transition: border 500ms ease-out;
256 border-top: 1px solid;
257 border-bottom: 1px solid;
280 .source .content pre.rust {
303 .content pre.line-numbers {
308 -webkit-user-select: none;
309 -moz-user-select: none;
310 -ms-user-select: none;
321 .docblock-short.nowrap {
325 text-overflow: ellipsis;
330 text-overflow: ellipsis;
333 .docblock-short code {
337 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
338 border-bottom: 1px solid;
341 #main > .docblock h1 { font-size: 1.3em; }
342 #main > .docblock h2 { font-size: 1.15em; }
343 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
345 .docblock h1 { font-size: 1em; }
346 .docblock h2 { font-size: 0.95em; }
347 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
354 .content .out-of-band {
359 display: inline-block;
365 h3.impl > .out-of-band {
369 h4.method > .out-of-band {
373 ul.item-list > li > .out-of-band {
377 h4 > code, h3 > code, .invisible > code {
378 max-width: calc(100% - 41px);
388 display: inline-block;
397 display: inline-block;
405 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
408 .content table:not(.table-display) {
409 border-spacing: 0 5px;
411 .content td { vertical-align: top; }
412 .content td:first-child { padding-right: 20px; }
413 .content td p:first-child { margin-top: 0; }
414 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
415 .content tr:first-child td { border-top: 0; }
437 .content .item-list {
438 list-style-type: none;
442 .content .item-list li {
446 .content .multi-column {
447 -moz-column-count: 5;
448 -moz-column-gap: 2.5em;
449 -webkit-column-count: 5;
450 -webkit-column-gap: 2.5em;
454 .content .multi-column li { width: 100%; display: inline-block; }
460 /* Shift "where ..." part of method or fn definition down a line */
461 .content .method .where,
463 .content .where.fmt-newline {
468 .content .methods > div:not(.important-traits) {
473 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
476 .content .impl-items .docblock, .content .impl-items .stability {
479 .content .docblock > .impl-items {
483 .content .docblock > .impl-items > h4 {
486 .content .docblock >.impl-items .table-display {
489 .content .docblock >.impl-items table td {
492 .toggle-wrapper.marg-left > .collapse-toggle {
495 .content .docblock > .impl-items .table-display, .impl-items table td {
499 .content .stability code {
504 border-bottom: 1px solid;
505 padding-bottom: 10px;
513 border-top: 1px solid;
514 border-bottom: 1px solid;
516 nav.main .separator {
518 display: inline-block;
522 nav.sum { text-align: right; }
523 nav.sub form { display: inline; }
530 text-decoration: none;
531 background: transparent;
534 .small-section-header:hover > .anchor {
538 .in-band:hover > .anchor {
539 display: inline-block;
550 .small-section-header > .anchor {
553 .small-section-header > .anchor:not(.field) {
557 content: '\2002\00a7\2002';
560 .docblock a:not(.srclink):not(.test-arrow):hover,
561 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
562 text-decoration: underline;
565 .block a.current.crate { font-weight: 500; }
570 .search-container > .top-button {
576 width: calc(100% - 34px);
577 /* Override Normalize.css: we have margins and do
578 not want to overflow - the `moz` attribute is necessary
579 until Firefox 29, too early to drop at this point */
580 -moz-box-sizing: border-box !important;
581 box-sizing: border-box !important;
588 transition: border-color 300ms ease;
589 transition: border-radius 300ms ease-in-out;
590 transition: box-shadow 300ms ease-in-out;
593 .search-input:focus {
597 box-shadow: 0 0 8px #078dd8;
600 .search-results .desc {
602 text-overflow: ellipsis;
611 .content .search-results td:first-child {
615 .content .search-results td:first-child a {
618 .content .search-results td:first-child a span {
622 tr.result span.primitive::after {
623 content: ' (primitive type)';
627 tr.result span.keyword::after {
628 content: ' (keyword)';
632 body.blur > :not(#help) {
634 -webkit-filter: blur(8px);
645 justify-content: center;
650 box-shadow: 0 0 6px rgba(0,0,0,.2);
660 #help dd { margin: 5px 35px; }
661 #help .infos { padding-left: 0; }
662 #help h1, #help h2 { margin-top: 0; }
695 background: inherit !important;
698 .module-item.unstable {
714 .variants_table tbody tr td:first-child {
715 width: 1%; /* make the variant name as small as possible */
726 pre.rust .question-mark {
731 display: inline-block;
733 padding: 5px 10px 5px 10px;
740 text-decoration: none;
743 .section-header:hover a:before {
746 content: '\2002\00a7\2002';
749 .section-header:hover a {
750 text-decoration: none;
764 h3 > .collapse-toggle, h4 > .collapse-toggle {
769 .toggle-wrapper > .collapse-toggle {
779 .toggle-wrapper.collapsed {
781 transition: height .2s;
785 .collapse-toggle > .inner {
786 display: inline-block;
816 .toggle-wrapper > .collapse-toggle {
820 .variant + .toggle-wrapper + .docblock > p {
824 .sub-variant, .sub-variant > h3 {
825 margin-top: 0 !important;
829 display: inline-block;
834 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
840 .docblock > .section-header:first-child {
845 .docblock > .section-header:first-child:hover > a:before {
849 .enum > .collapsed, .struct > .collapsed {
853 #main > .variant, #main > .structfield {
859 margin-top: 0px !important;
861 margin-bottom: 0px !important;
864 .toggle-attributes.collapsed {
867 .impl-items > .toggle-attributes {
870 .impl-items .attributes {
880 @media (max-width: 700px) {
888 width: calc(100% + 30px);
896 .sidebar > .location {
900 padding: 3px 10px 1px 10px;
907 .sidebar .location:empty {
928 border-bottom: 1px solid;
929 border-right: 1px solid;
940 border-right: 1px solid;
944 .sidebar > .block.version {
950 width: calc(100% - 32px);
967 .content h4 > .out-of-band {
971 .toggle-wrapper > .collapse-toggle {
983 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
988 display: none !important;
993 nav.sub, .content .out-of-band, .collapse-toggle {
1007 display: inline-block;
1011 .tooltip .tooltiptext {
1023 .tooltip:hover .tooltiptext {
1027 .tooltip .tooltiptext::after {
1034 border-style: solid;
1037 .important-traits .tooltip .tooltiptext {
1060 border-bottom: 1px solid;
1065 #titles > div.selected {
1066 border-bottom: 3px solid;
1069 #titles > div:hover {
1070 border-bottom: 3px solid;
1073 #titles > div > div.count {
1074 display: inline-block;
1083 h4 > .important-traits {
1089 @media (max-width: 700px) {
1090 h4 > .important-traits {
1096 #titles > div > div.count {
1109 background-color: rgba(0,0,0,0);
1118 .show-it > .block.items {
1122 .show-it > .block.items > ul {
1126 .show-it > .block.items > ul > li {
1131 .show-it > .block.items > ul > li > a {
1135 /* Because of ios, we need to actually have a full height sidebar title so the
1136 * actual sidebar can show up. But then we need to make it transparent so we don't
1137 * hide content. The filler just allows to create the background for the sidebar
1138 * title. But because of the absolute position, I had to lower the z-index.
1143 width: calc(100% - 45px);
1147 border-bottom: 1px solid;
1154 .impl > .collapse-toggle {
1160 @media (max-width: 416px) {
1187 transform: translate(-50%, -40%);
1190 border-top-right-radius: 0;
1193 .modal-content > .docblock {
1199 margin-bottom: 13px;
1203 .modal-content > .docblock > code.content {
1209 .modal-content > .close {
1217 border-top-right-radius: 5px;
1218 border-bottom-right-radius: 5px;
1225 .modal-content > .whiter {
1233 #main > div.important-traits {
1239 .content > .methods > div.important-traits {
1246 display: inline-block;
1248 font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1250 vertical-align: middle;
1253 box-shadow: inset 0 -1px 0;
1263 .theme-picker button {
1274 #theme-picker, #settings-menu {
1294 #theme-choices > button {
1299 background: rgba(0,0,0,0);
1302 #theme-choices > button:not(:first-child) {
1303 border-top: 1px solid;
1306 @media (max-width: 700px) {
1314 .hidden-by-impl-hider,
1315 .hidden-by-usual-hider {
1316 /* important because of conflicting rule for small screens */
1317 display: none !important;
1320 #implementations-list > h3 > span.in-band {
1327 border-collapse: collapse;
1332 .table-display tr td:first-child {
1336 .table-display tr td:last-child {
1339 .table-display .out-of-band {
1355 margin-bottom: 10px;