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 {
362 h3.impl > .out-of-band {
366 h4.method > .out-of-band {
370 ul.item-list > li > .out-of-band {
374 h4 > code, h3 > code, .invisible > code {
375 max-width: calc(100% - 41px);
385 display: inline-block;
394 display: inline-block;
402 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
405 .content table:not(.table-display) {
406 border-spacing: 0 5px;
408 .content td { vertical-align: top; }
409 .content td:first-child { padding-right: 20px; }
410 .content td p:first-child { margin-top: 0; }
411 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
412 .content tr:first-child td { border-top: 0; }
434 .content .item-list {
435 list-style-type: none;
439 .content .item-list li {
443 .content .multi-column {
444 -moz-column-count: 5;
445 -moz-column-gap: 2.5em;
446 -webkit-column-count: 5;
447 -webkit-column-gap: 2.5em;
451 .content .multi-column li { width: 100%; display: inline-block; }
457 /* Shift "where ..." part of method or fn definition down a line */
458 .content .method .where,
460 .content .where.fmt-newline {
465 .content .methods > div:not(.important-traits) {
470 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
473 .content .impl-items .docblock, .content .impl-items .stability {
476 .content .docblock > .impl-items {
480 .content .docblock > .impl-items > h4 {
483 .content .docblock >.impl-items .table-display {
486 .content .docblock >.impl-items table td {
489 .toggle-wrapper.marg-left > .collapse-toggle {
492 .content .docblock > .impl-items .table-display, .impl-items table td {
496 .content .stability code {
500 .content .stability {
506 .content .stability::before {
513 .methods > .stability {
522 border-bottom: 1px solid;
523 padding-bottom: 10px;
531 border-top: 1px solid;
532 border-bottom: 1px solid;
534 nav.main .separator {
536 display: inline-block;
540 nav.sum { text-align: right; }
541 nav.sub form { display: inline; }
548 text-decoration: none;
549 background: transparent;
552 .small-section-header:hover > .anchor {
556 .in-band:hover > .anchor {
557 display: inline-block;
568 .small-section-header > .anchor {
570 padding-right: 10px; /* avoid gap that causes hover to disappear */
573 content: '\2002\00a7\2002';
576 .docblock a:not(.srclink):not(.test-arrow):hover,
577 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
578 text-decoration: underline;
581 .block a.current.crate { font-weight: 500; }
586 .search-container > .top-button {
592 width: calc(100% - 34px);
593 /* Override Normalize.css: we have margins and do
594 not want to overflow - the `moz` attribute is necessary
595 until Firefox 29, too early to drop at this point */
596 -moz-box-sizing: border-box !important;
597 box-sizing: border-box !important;
604 transition: border-color 300ms ease;
605 transition: border-radius 300ms ease-in-out;
606 transition: box-shadow 300ms ease-in-out;
609 .search-input:focus {
613 box-shadow: 0 0 8px #078dd8;
616 .search-results .desc {
618 text-overflow: ellipsis;
627 .content .search-results td:first-child {
631 .content .search-results td:first-child a {
634 .content .search-results td:first-child a:after {
639 .content .search-results td:first-child a span {
643 tr.result span.primitive::after {
644 content: ' (primitive type)';
648 tr.result span.keyword::after {
649 content: ' (keyword)';
653 body.blur > :not(#help) {
655 -webkit-filter: blur(8px);
666 justify-content: center;
671 box-shadow: 0 0 6px rgba(0,0,0,.2);
681 #help dd { margin: 5px 35px; }
682 #help .infos { padding-left: 0; }
683 #help h1, #help h2 { margin-top: 0; }
716 background: inherit !important;
719 .module-item.unstable {
735 .variants_table tbody tr td:first-child {
736 width: 1%; /* make the variant name as small as possible */
747 pre.rust .question-mark {
752 display: inline-block;
754 padding: 5px 10px 5px 10px;
761 text-decoration: none;
764 .section-header:hover a:before {
767 padding-right: 10px; /* avoid gap that causes hover to disappear */
768 content: '\2002\00a7\2002';
771 .section-header:hover a {
772 text-decoration: none;
786 h3 > .collapse-toggle, h4 > .collapse-toggle {
791 .toggle-wrapper > .collapse-toggle {
801 .toggle-wrapper.collapsed {
803 transition: height .2s;
807 .collapse-toggle > .inner {
808 display: inline-block;
838 .toggle-wrapper > .collapse-toggle {
842 .variant + .toggle-wrapper + .docblock > p {
846 .sub-variant, .sub-variant > h3 {
847 margin-top: 0 !important;
851 display: inline-block;
856 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
862 .docblock > .section-header:first-child {
867 .docblock > .section-header:first-child:hover > a:before {
871 .enum > .collapsed, .struct > .collapsed {
875 #main > .variant, #main > .structfield {
881 margin-top: 0px !important;
883 margin-bottom: 0px !important;
886 .toggle-attributes.collapsed {
889 .impl-items > .toggle-attributes {
892 .impl-items .attributes {
902 @media (max-width: 700px) {
910 width: calc(100% + 30px);
918 .sidebar > .location {
922 padding: 3px 10px 1px 10px;
929 .sidebar .location:empty {
950 border-bottom: 1px solid;
951 border-right: 1px solid;
962 border-right: 1px solid;
966 .sidebar > .block.version {
972 width: calc(100% - 32px);
989 .content h4 > .out-of-band {
993 .toggle-wrapper > .collapse-toggle {
1005 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1010 display: none !important;
1015 nav.sub, .content .out-of-band, .collapse-toggle {
1029 display: inline-block;
1033 .tooltip .tooltiptext {
1045 .tooltip:hover .tooltiptext {
1049 .tooltip .tooltiptext::after {
1056 border-style: solid;
1059 .important-traits .tooltip .tooltiptext {
1082 border-bottom: 1px solid;
1087 #titles > div.selected {
1088 border-bottom: 3px solid;
1091 #titles > div:hover {
1092 border-bottom: 3px solid;
1095 #titles > div > div.count {
1096 display: inline-block;
1105 h4 > .important-traits {
1111 @media (max-width: 700px) {
1112 h4 > .important-traits {
1118 #titles > div > div.count {
1131 background-color: rgba(0,0,0,0);
1140 .show-it > .block.items {
1144 .show-it > .block.items > ul {
1148 .show-it > .block.items > ul > li {
1153 .show-it > .block.items > ul > li > a {
1157 /* Because of ios, we need to actually have a full height sidebar title so the
1158 * actual sidebar can show up. But then we need to make it transparent so we don't
1159 * hide content. The filler just allows to create the background for the sidebar
1160 * title. But because of the absolute position, I had to lower the z-index.
1165 width: calc(100% - 45px);
1169 border-bottom: 1px solid;
1176 .impl > .collapse-toggle {
1182 @media (max-width: 416px) {
1209 transform: translate(-50%, -40%);
1212 border-top-right-radius: 0;
1215 .modal-content > .docblock {
1221 margin-bottom: 13px;
1225 .modal-content > .docblock > code.content {
1231 .modal-content > .close {
1239 border-top-right-radius: 5px;
1240 border-bottom-right-radius: 5px;
1247 .modal-content > .whiter {
1255 #main > div.important-traits {
1261 .content > .methods > div.important-traits {
1268 display: inline-block;
1270 font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1272 vertical-align: middle;
1275 box-shadow: inset 0 -1px 0;
1285 .theme-picker button {
1296 #theme-picker, #settings-menu {
1316 #theme-choices > button {
1321 background: rgba(0,0,0,0);
1324 #theme-choices > button:not(:first-child) {
1325 border-top: 1px solid;
1328 @media (max-width: 700px) {
1336 .hidden-by-impl-hider,
1337 .hidden-by-usual-hider {
1338 /* important because of conflicting rule for small screens */
1339 display: none !important;
1342 #implementations-list > h3 > span.in-band {
1349 border-collapse: collapse;
1354 .table-display tr td:first-child {
1358 .table-display tr td:last-child {
1361 .table-display .out-of-band {
1377 margin-bottom: 10px;