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 #source-sidebar, #sidebar-toggle {
118 font-family: "Fira Sans", sans-serif;
124 ul ul, ol ul, ul ol, ol ol {
137 font-family: "Source Code Pro", monospace;
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 .rustdoc:not(.source) .example-wrap {
286 display: inline-flex;
294 .example-wrap > pre.line-number {
297 border-top-left-radius: 5px;
298 border-bottom-left-radius: 5px;
303 .rustdoc:not(.source) .example-wrap > pre.rust {
308 .rustdoc:not(.source) .example-wrap > pre {
329 .content pre.line-numbers {
334 -webkit-user-select: none;
335 -moz-user-select: none;
336 -ms-user-select: none;
347 .docblock-short.nowrap {
351 text-overflow: ellipsis;
356 text-overflow: ellipsis;
359 .docblock-short code {
363 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
364 border-bottom: 1px solid;
367 #main > .docblock h1 { font-size: 1.3em; }
368 #main > .docblock h2 { font-size: 1.15em; }
369 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
371 #main > h2 + div, #main > h2 + h3, #main > h3 + div {
375 .docblock h1 { font-size: 1em; }
376 .docblock h2 { font-size: 0.95em; }
377 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
384 .content .out-of-band {
392 h3.impl > .out-of-band {
396 h4.method > .out-of-band {
400 h4 > code, h3 > code, .invisible > code {
401 max-width: calc(100% - 41px);
411 display: inline-block;
420 display: inline-block;
428 font-family: "Fira Sans", sans-serif;
431 .content table:not(.table-display) {
432 border-spacing: 0 5px;
434 .content td { vertical-align: top; }
435 .content td:first-child { padding-right: 20px; }
436 .content td p:first-child { margin-top: 0; }
437 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
438 .content tr:first-child td { border-top: 0; }
460 .content .item-list {
461 list-style-type: none;
465 .content .multi-column {
466 -moz-column-count: 5;
467 -moz-column-gap: 2.5em;
468 -webkit-column-count: 5;
469 -webkit-column-gap: 2.5em;
473 .content .multi-column li { width: 100%; display: inline-block; }
479 /* Shift "where ..." part of method or fn definition down a line */
480 .content .method .where,
482 .content .where.fmt-newline {
487 .content .methods > div:not(.important-traits) {
492 .content .docblock > .impl-items {
496 .content .docblock > .impl-items > h4 {
499 .content .docblock >.impl-items .table-display {
502 .content .docblock >.impl-items table td {
505 .toggle-wrapper.marg-left > .collapse-toggle {
508 .content .docblock > .impl-items .table-display, .impl-items table td {
512 .content .stability code {
516 .content .stability {
522 .sub-variant > div > .stability {
526 .content .stability::before {
534 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
538 .content .impl-items .docblock, .content .impl-items .stability {
542 .content .impl-items > .stability {
546 .methods > .stability, .content .impl-items > .stability {
555 border-bottom: 1px solid;
556 padding-bottom: 10px;
564 border-top: 1px solid;
565 border-bottom: 1px solid;
567 nav.main .separator {
569 display: inline-block;
573 nav.sum { text-align: right; }
574 nav.sub form { display: inline; }
581 text-decoration: none;
582 background: transparent;
585 .small-section-header:hover > .anchor {
589 .in-band:hover > .anchor {
590 display: inline-block;
601 .small-section-header > .anchor {
603 padding-right: 10px; /* avoid gap that causes hover to disappear */
606 content: '\2002\00a7\2002';
609 .docblock a:not(.srclink):not(.test-arrow):hover,
610 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
611 text-decoration: underline;
614 .invisible > .srclink, h4 > code + .srclink {
622 .block a.current.crate { font-weight: 500; }
627 .search-container > div {
628 display: inline-flex;
629 width: calc(100% - 34px);
637 border-radius: 4px 0 0 4px;
640 border-right: 1px solid;
641 -moz-appearance: none;
642 -webkit-appearance: none;
643 /* Removes default arrow from firefox */
646 background-repeat: no-repeat;
647 background-color: transparent;
648 background-size: 20px;
649 background-position: calc(100% - 1px) 56%;
651 .search-container > .top-button {
657 /* Override Normalize.css: we have margins and do
658 not want to overflow - the `moz` attribute is necessary
659 until Firefox 29, too early to drop at this point */
660 -moz-box-sizing: border-box !important;
661 box-sizing: border-box !important;
664 border-radius: 0 1px 1px 0;
668 transition: border-color 300ms ease;
669 transition: border-radius 300ms ease-in-out;
670 transition: box-shadow 300ms ease-in-out;
674 .search-input:focus {
678 box-shadow: 0 0 8px #078dd8;
681 .search-results .desc {
683 text-overflow: ellipsis;
692 .content .search-results td:first-child {
696 .content .search-results td:first-child a {
699 .content .search-results td:first-child a:after {
704 .content .search-results td:first-child a span {
708 tr.result span.primitive::after {
709 content: ' (primitive type)';
713 tr.result span.keyword::after {
714 content: ' (keyword)';
718 body.blur > :not(#help) {
720 -webkit-filter: blur(8px);
731 justify-content: center;
736 box-shadow: 0 0 6px rgba(0,0,0,.2);
746 #help dd { margin: 5px 35px; }
747 #help .infos { padding-left: 0; }
748 #help h1, #help h2 { margin-top: 0; }
781 background: inherit !important;
784 .module-item.unstable {
800 .variants_table tbody tr td:first-child {
801 width: 1%; /* make the variant name as small as possible */
812 pre.rust .question-mark {
817 display: inline-block;
819 padding: 5px 10px 5px 10px;
826 text-decoration: none;
829 .section-header:hover a:before {
832 padding-right: 10px; /* avoid gap that causes hover to disappear */
833 content: '\2002\00a7\2002';
836 .section-header:hover a {
837 text-decoration: none;
851 h3 > .collapse-toggle, h4 > .collapse-toggle {
856 .toggle-wrapper > .collapse-toggle {
866 .toggle-wrapper.collapsed {
868 transition: height .2s;
872 .collapse-toggle > .inner {
873 display: inline-block;
878 .collapse-toggle.hidden-default {
908 .toggle-wrapper > .collapse-toggle {
912 .variant + .toggle-wrapper + .docblock > p {
916 .sub-variant, .sub-variant > h3 {
917 margin-top: 1px !important;
920 #main > .sub-variant > h3 {
931 .sub-variant > div > span {
937 display: inline-block;
942 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
948 .docblock > .section-header:first-child {
953 .docblock > .section-header:first-child:hover > a:before {
957 .enum > .collapsed, .struct > .collapsed {
961 #main > .variant, #main > .structfield {
967 margin-top: 0px !important;
969 margin-bottom: 0px !important;
972 .toggle-attributes.collapsed {
975 .impl-items > .toggle-attributes {
978 .impl-items .attributes {
988 @media (max-width: 700px) {
993 .rustdoc > .sidebar {
1003 .sidebar > .location {
1007 padding: 3px 10px 1px 10px;
1009 background: inherit;
1014 .sidebar .location:empty {
1035 border-bottom: 1px solid;
1036 border-right: 1px solid;
1047 border-right: 1px solid;
1051 .sidebar > .block.version {
1052 border-bottom: none;
1057 width: calc(100% - 32px);
1074 .content h4 > .out-of-band {
1078 .toggle-wrapper > .collapse-toggle {
1090 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1095 display: none !important;
1104 nav.sub, .content .out-of-band, .collapse-toggle {
1118 display: inline-block;
1122 .tooltip .tooltiptext {
1134 .tooltip:hover .tooltiptext {
1138 .tooltip .tooltiptext::after {
1145 border-style: solid;
1148 .important-traits .tooltip .tooltiptext {
1163 .search-failed > ul {
1180 border-top: 2px solid;
1183 #titles > div:not(:last-child):not(.selected) {
1185 width: calc(33.3% - 1px);
1188 #titles > div > div.count {
1189 display: inline-block;
1198 h4 > .important-traits {
1208 margin-bottom: 10px;
1216 @media (max-width: 700px) {
1217 h4 > .important-traits {
1223 #titles > div > div.count {
1236 background-color: rgba(0,0,0,0);
1240 width: calc(100% + 30px);
1248 .show-it > .block.items {
1252 .show-it > .block.items > ul {
1256 .show-it > .block.items > ul > li {
1261 .show-it > .block.items > ul > li > a {
1265 /* Because of ios, we need to actually have a full height sidebar title so the
1266 * actual sidebar can show up. But then we need to make it transparent so we don't
1267 * hide content. The filler just allows to create the background for the sidebar
1268 * title. But because of the absolute position, I had to lower the z-index.
1273 width: calc(100% - 45px);
1277 border-bottom: 1px solid;
1284 .impl > .collapse-toggle {
1294 @media (max-width: 416px) {
1321 transform: translate(-50%, -40%);
1324 border-top-right-radius: 0;
1327 .modal-content > .docblock {
1333 margin-bottom: 13px;
1337 .modal-content > .docblock > code.content {
1343 .modal-content > .close {
1351 border-top-right-radius: 5px;
1352 border-bottom-right-radius: 5px;
1359 .modal-content > .whiter {
1367 #main > div.important-traits {
1373 .content > .methods > div.important-traits {
1380 display: inline-block;
1382 font: 15px monospace;
1384 vertical-align: middle;
1387 box-shadow: inset 0 -1px 0;
1397 .theme-picker button {
1408 #theme-picker, #settings-menu {
1428 #theme-choices > button {
1433 background: rgba(0,0,0,0);
1436 #theme-choices > button:not(:first-child) {
1437 border-top: 1px solid;
1440 @media (max-width: 700px) {
1448 .hidden-by-impl-hider,
1449 .hidden-by-usual-hider {
1450 /* important because of conflicting rule for small screens */
1451 display: none !important;
1454 #implementations-list > h3 > span.in-band {
1461 border-collapse: collapse;
1466 .table-display tr td:first-child {
1470 .table-display tr td:last-child {
1473 .table-display .out-of-band {
1478 #implementors-list > .impl-items .table-display .out-of-band {
1482 .table-display td:hover .anchor {
1505 border-top-right-radius: 3px;
1506 border-bottom-right-radius: 3px;
1509 transition: left .5s;
1522 transition: left .5s;
1523 border-right: 1px solid;
1525 #source-sidebar > .title {
1528 border-bottom: 1px solid;
1545 div.files > a:hover, div.name:hover {
1546 background-color: #a14b4b;
1548 div.name.expand + .children {
1559 div.name.expand::before {
1560 transform: rotate(90deg);