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", 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", sans-serif;
123 ul ul, ol ul, ul ol, ol ol {
136 font-family: "Source Code Pro", 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 {
285 body:not(.source) .example-wrap {
286 display: inline-flex;
293 .example-wrap > pre.line-number {
296 border-top-left-radius: 5px;
297 border-bottom-left-radius: 5px;
302 body:not(.source) .example-wrap > pre.rust {
323 .content pre.line-numbers {
328 -webkit-user-select: none;
329 -moz-user-select: none;
330 -ms-user-select: none;
341 .docblock-short.nowrap {
345 text-overflow: ellipsis;
350 text-overflow: ellipsis;
353 .docblock-short code {
357 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
358 border-bottom: 1px solid;
361 #main > .docblock h1 { font-size: 1.3em; }
362 #main > .docblock h2 { font-size: 1.15em; }
363 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
365 .docblock h1 { font-size: 1em; }
366 .docblock h2 { font-size: 0.95em; }
367 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
374 .content .out-of-band {
382 h3.impl > .out-of-band {
386 h4.method > .out-of-band {
390 h4 > code, h3 > code, .invisible > code {
391 max-width: calc(100% - 41px);
401 display: inline-block;
410 display: inline-block;
418 font-family: "Fira Sans", sans-serif;
421 .content table:not(.table-display) {
422 border-spacing: 0 5px;
424 .content td { vertical-align: top; }
425 .content td:first-child { padding-right: 20px; }
426 .content td p:first-child { margin-top: 0; }
427 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
428 .content tr:first-child td { border-top: 0; }
450 .content .item-list {
451 list-style-type: none;
455 .content .multi-column {
456 -moz-column-count: 5;
457 -moz-column-gap: 2.5em;
458 -webkit-column-count: 5;
459 -webkit-column-gap: 2.5em;
463 .content .multi-column li { width: 100%; display: inline-block; }
469 /* Shift "where ..." part of method or fn definition down a line */
470 .content .method .where,
472 .content .where.fmt-newline {
477 .content .methods > div:not(.important-traits) {
482 .content .docblock > .impl-items {
486 .content .docblock > .impl-items > h4 {
489 .content .docblock >.impl-items .table-display {
492 .content .docblock >.impl-items table td {
495 .toggle-wrapper.marg-left > .collapse-toggle {
498 .content .docblock > .impl-items .table-display, .impl-items table td {
502 .content .stability code {
506 .content .stability {
512 .sub-variant > div > .stability {
516 .content .stability::before {
524 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
528 .content .impl-items .docblock, .content .impl-items .stability {
532 .content .impl-items > .stability {
536 .methods > .stability, .content .impl-items > .stability {
545 border-bottom: 1px solid;
546 padding-bottom: 10px;
554 border-top: 1px solid;
555 border-bottom: 1px solid;
557 nav.main .separator {
559 display: inline-block;
563 nav.sum { text-align: right; }
564 nav.sub form { display: inline; }
571 text-decoration: none;
572 background: transparent;
575 .small-section-header:hover > .anchor {
579 .in-band:hover > .anchor {
580 display: inline-block;
591 .small-section-header > .anchor {
593 padding-right: 10px; /* avoid gap that causes hover to disappear */
596 content: '\2002\00a7\2002';
599 .docblock a:not(.srclink):not(.test-arrow):hover,
600 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
601 text-decoration: underline;
604 .invisible > .srclink {
612 .block a.current.crate { font-weight: 500; }
617 .search-container > div {
618 display: inline-flex;
619 width: calc(100% - 34px);
627 border-radius: 4px 0 0 4px;
630 border-right: 1px solid;
631 -moz-appearance: none;
632 -webkit-appearance: none;
633 /* Removes default arrow from firefox */
637 .search-container > .top-button {
643 /* Override Normalize.css: we have margins and do
644 not want to overflow - the `moz` attribute is necessary
645 until Firefox 29, too early to drop at this point */
646 -moz-box-sizing: border-box !important;
647 box-sizing: border-box !important;
650 border-radius: 0 1px 1px 0;
654 transition: border-color 300ms ease;
655 transition: border-radius 300ms ease-in-out;
656 transition: box-shadow 300ms ease-in-out;
660 .search-input:focus {
664 box-shadow: 0 0 8px #078dd8;
667 .search-results .desc {
669 text-overflow: ellipsis;
678 .content .search-results td:first-child {
682 .content .search-results td:first-child a {
685 .content .search-results td:first-child a:after {
690 .content .search-results td:first-child a span {
694 tr.result span.primitive::after {
695 content: ' (primitive type)';
699 tr.result span.keyword::after {
700 content: ' (keyword)';
704 body.blur > :not(#help) {
706 -webkit-filter: blur(8px);
717 justify-content: center;
722 box-shadow: 0 0 6px rgba(0,0,0,.2);
732 #help dd { margin: 5px 35px; }
733 #help .infos { padding-left: 0; }
734 #help h1, #help h2 { margin-top: 0; }
767 background: inherit !important;
770 .module-item.unstable {
786 .variants_table tbody tr td:first-child {
787 width: 1%; /* make the variant name as small as possible */
798 pre.rust .question-mark {
803 display: inline-block;
805 padding: 5px 10px 5px 10px;
812 text-decoration: none;
815 .section-header:hover a:before {
818 padding-right: 10px; /* avoid gap that causes hover to disappear */
819 content: '\2002\00a7\2002';
822 .section-header:hover a {
823 text-decoration: none;
837 h3 > .collapse-toggle, h4 > .collapse-toggle {
842 .toggle-wrapper > .collapse-toggle {
852 .toggle-wrapper.collapsed {
854 transition: height .2s;
858 .collapse-toggle > .inner {
859 display: inline-block;
864 .collapse-toggle.hidden-default {
894 .toggle-wrapper > .collapse-toggle {
898 .variant + .toggle-wrapper + .docblock > p {
902 .sub-variant, .sub-variant > h3 {
903 margin-top: 1px !important;
906 #main > .sub-variant > h3 {
917 .sub-variant > div > span {
923 display: inline-block;
928 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
934 .docblock > .section-header:first-child {
939 .docblock > .section-header:first-child:hover > a:before {
943 .enum > .collapsed, .struct > .collapsed {
947 #main > .variant, #main > .structfield {
953 margin-top: 0px !important;
955 margin-bottom: 0px !important;
958 .toggle-attributes.collapsed {
961 .impl-items > .toggle-attributes {
964 .impl-items .attributes {
974 @media (max-width: 700px) {
989 .sidebar > .location {
993 padding: 3px 10px 1px 10px;
1000 .sidebar .location:empty {
1021 border-bottom: 1px solid;
1022 border-right: 1px solid;
1033 border-right: 1px solid;
1037 .sidebar > .block.version {
1038 border-bottom: none;
1043 width: calc(100% - 32px);
1060 .content h4 > .out-of-band {
1064 .toggle-wrapper > .collapse-toggle {
1076 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1081 display: none !important;
1090 nav.sub, .content .out-of-band, .collapse-toggle {
1104 display: inline-block;
1108 .tooltip .tooltiptext {
1120 .tooltip:hover .tooltiptext {
1124 .tooltip .tooltiptext::after {
1131 border-style: solid;
1134 .important-traits .tooltip .tooltiptext {
1159 border-top: 2px solid;
1162 #titles > div:not(:last-child):not(.selected) {
1164 width: calc(33.3% - 1px);
1167 #titles > div > div.count {
1168 display: inline-block;
1177 h4 > .important-traits {
1187 margin-bottom: 10px;
1195 @media (max-width: 700px) {
1196 h4 > .important-traits {
1202 #titles > div > div.count {
1215 background-color: rgba(0,0,0,0);
1219 width: calc(100% + 30px);
1227 .show-it > .block.items {
1231 .show-it > .block.items > ul {
1235 .show-it > .block.items > ul > li {
1240 .show-it > .block.items > ul > li > a {
1244 /* Because of ios, we need to actually have a full height sidebar title so the
1245 * actual sidebar can show up. But then we need to make it transparent so we don't
1246 * hide content. The filler just allows to create the background for the sidebar
1247 * title. But because of the absolute position, I had to lower the z-index.
1252 width: calc(100% - 45px);
1256 border-bottom: 1px solid;
1263 .impl > .collapse-toggle {
1273 @media (max-width: 416px) {
1300 transform: translate(-50%, -40%);
1303 border-top-right-radius: 0;
1306 .modal-content > .docblock {
1312 margin-bottom: 13px;
1316 .modal-content > .docblock > code.content {
1322 .modal-content > .close {
1330 border-top-right-radius: 5px;
1331 border-bottom-right-radius: 5px;
1338 .modal-content > .whiter {
1346 #main > div.important-traits {
1352 .content > .methods > div.important-traits {
1359 display: inline-block;
1361 font: 15px monospace;
1363 vertical-align: middle;
1366 box-shadow: inset 0 -1px 0;
1376 .theme-picker button {
1387 #theme-picker, #settings-menu {
1407 #theme-choices > button {
1412 background: rgba(0,0,0,0);
1415 #theme-choices > button:not(:first-child) {
1416 border-top: 1px solid;
1419 @media (max-width: 700px) {
1427 .hidden-by-impl-hider,
1428 .hidden-by-usual-hider {
1429 /* important because of conflicting rule for small screens */
1430 display: none !important;
1433 #implementations-list > h3 > span.in-band {
1440 border-collapse: collapse;
1445 .table-display tr td:first-child {
1449 .table-display tr td:last-child {
1452 .table-display .out-of-band {
1457 #implementors-list > .impl-items .table-display .out-of-band {
1461 .table-display td:hover .anchor {