]>
git.proxmox.com Git - rustc.git/blob - src/librustdoc/html/static/rustdoc.css
1 /* See FiraSans-LICENSE.txt for the Fira Sans license. */
3 font-family: 'Fira Sans';
6 src: local
('Fira Sans'), url
("FiraSans-Regular.woff") format
('woff');
9 font-family: 'Fira Sans';
12 src: local
('Fira Sans Medium'), url
("FiraSans-Medium.woff") format
('woff');
15 /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */
17 font-family: 'Source Serif Pro';
20 src: local
('Source Serif Pro'), url
("SourceSerifPro-Regular.ttf.woff") format
('woff');
23 font-family: 'Source Serif Pro';
26 src: local
('Source Serif Pro Italic'), url
("SourceSerifPro-It.ttf.woff") format
('woff');
29 font-family: 'Source Serif Pro';
32 src: local
('Source Serif Pro Bold'), url
("SourceSerifPro-Bold.ttf.woff") format
('woff');
35 /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
37 font-family: 'Source Code Pro';
40 /* Avoid using locally installed font because bad versions are in circulation:
41 * see https://github.com/rust-lang/rust/issues/24355 */
42 src: url
("SourceCodePro-Regular.woff") format
('woff');
45 font-family: 'Source Code Pro';
48 src: url
("SourceCodePro-Semibold.woff") format
('woff');
52 -webkit-box-sizing: border-box
;
53 -moz-box-sizing: border-box
;
54 box-sizing: border-box
;
57 /* This part handles the "default" theme being used depending on the system one. */
61 @media (prefers-color-scheme: light
) {
66 @media (prefers-color-scheme: dark
) {
72 /* General structure and fonts */
75 font: 16px/1.4 "Source Serif Pro", serif
;
78 padding: 10px 15px 20px 15px;
80 -webkit-font-feature-settings: "kern", "liga";
81 -moz-font-feature-settings: "kern", "liga";
82 font-feature-settings: "kern", "liga";
94 h1
, h2
, h3:not
(.impl
):not
(.method
):not
(.type
):not
(.tymethod
):not
(.important
), h4:not
(.method
):not
(.type
):not
(.tymethod
):not
(.associatedconstant
) {
96 margin: 20px 0 15px 0;
100 border-bottom: 1px dashed
;
103 h2
, h3:not
(.impl
):not
(.method
):not
(.type
):not
(.tymethod
), h4:not
(.method
):not
(.type
):not
(.tymethod
):not
(.associatedconstant
) {
104 border-bottom: 1px solid
;
106 h3
.impl
, h3
.method
, h4
.method
, h3
.type
, h4
.type
, h4
.associatedconstant
{
113 h3
.impl
, h3
.method
, h3
.type
{
118 .sidebar
, a
.source
, .search-input
, .content
table :not
(code
)>a
,
119 .collapse-toggle
, div
.item-list
.out-of-band
,
120 #source-sidebar, #sidebar-toggle
{
121 font-family: "Fira Sans", sans-serif
;
127 ul ul
, ol ul
, ul ol
, ol ol
{
140 font-family: "Source Code Pro", monospace
;
142 .docblock code, .docblock-short code {
146 .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
149 .docblock code.spotlight :last-child {
150 padding-bottom: 0.6em;
156 .source .content pre {
178 text-transform: uppercase
;
190 .sidebar .block > ul > li {
198 /* Everything else */
201 display: none
!important
;
213 .logo-container > img {
219 transform: translate
(-50%, -50%);
226 margin: 30px 10px 20px 10px;
228 word-wrap: break-word
;
234 border-bottom: 1px solid
;
235 overflow-wrap: break-word
;
236 word-wrap: break-word
; /* deprecated */
237 word-break: break-word
; /* Chrome, non-standard */
244 .location a:first-child {
252 .block h2, .block h3 {
257 .block ul, .block li {
265 text-overflow: ellipsis
;
271 transition: border
500ms ease-out
;
275 border-top: 1px solid
;
276 border-bottom: 1px solid
;
299 .source .content pre.rust {
305 .rustdoc:not(.source) .example-wrap {
306 display: inline-flex
;
314 .example-wrap > pre.line-number {
317 border-top-left-radius: 5px;
318 border-bottom-left-radius: 5px;
323 .rustdoc:not(.source) .example-wrap > pre.rust {
328 .rustdoc:not(.source) .example-wrap > pre {
349 .content pre.line-numbers {
354 -webkit-user-select: none
;
355 -moz-user-select: none
;
356 -ms-user-select: none
;
367 .docblock-short.nowrap {
371 text-overflow: ellipsis
;
376 text-overflow: ellipsis
;
379 .docblock code, .docblock-short code {
380 white-space: pre-wrap
;
383 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
384 border-bottom: 1px solid
;
387 #main > .docblock h1
{ font-size: 1.3em; }
388 #main > .docblock h2
{ font-size: 1.15em; }
389 #main > .docblock h3
, #main
> .docblock h4
, #main
> .docblock h5
{ font-size: 1em; }
391 #main > h2
+ div
, #main
> h2
+ h3
, #main
> h3
+ div
{
392 display: none
; /* Changed to flex or block via js once the page is loaded */
396 .docblock h1 { font-size: 1em; }
397 .docblock h2 { font-size: 0.95em; }
398 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
405 .content .out-of-band {
413 h3
.impl
> .out-of-band
{
417 h4
.method
> .out-of-band
{
421 h4
> code
, h3
> code
, .invisible
> code
{
422 max-width: calc
(100% - 41px);
428 display: inline-block
;
437 display: inline-block
;
445 font-family: "Fira Sans", sans-serif
;
448 .content table:not(.table-display) {
449 border-spacing: 0 5px;
451 .content td { vertical-align: top
; }
452 .content td:first-child { padding-right: 20px; }
453 .content td p:first-child { margin-top: 0; }
454 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
455 .content tr:first-child td { border-top: 0; }
459 width: calc
(100% - 2px);
478 .content .item-list {
479 list-style-type: none
;
483 .content .multi-column {
484 -moz-column-count: 5;
485 -moz-column-gap: 2.5em;
486 -webkit-column-count: 5;
487 -webkit-column-gap: 2.5em;
491 .content .multi-column li { width: 100%; display: inline-block
; }
497 /* Shift "where ..." part of method or fn definition down a line */
498 .content
.method
.where
,
500 .content .where.fmt-newline {
505 .content .methods > div:not(.important-traits) {
510 .content .docblock > .impl-items {
514 .content .docblock > .impl-items > h4 {
517 .content .docblock >.impl-items .table-display {
520 .content .docblock >.impl-items table td {
523 .toggle-wrapper.marg-left > .collapse-toggle {
526 .content .docblock > .impl-items .table-display, .impl-items table td {
530 .content .stability code {
534 .content .stability {
540 .sub-variant > div > .stability {
544 .content .stability::before {
552 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
556 .content .impl-items .docblock, .content .impl-items .stability {
560 .content .impl-items > .stability {
564 .methods > .stability, .content .impl-items > .stability {
577 border-bottom: 1px solid
;
578 padding-bottom: 10px;
586 border-top: 1px solid
;
587 border-bottom: 1px solid
;
589 nav
.main
.separator
{
591 display: inline-block
;
595 nav
.sum
{ text-align: right
; }
596 nav
.sub form
{ display: inline
; }
603 text-decoration: none
;
604 background: transparent
;
607 .small-section-header:hover > .anchor {
611 .in-band:hover > .anchor {
612 display: inline-block
;
623 .small-section-header > .anchor {
625 padding-right: 10px; /* avoid gap that causes hover to disappear */
628 content: '\2002\00a7\2002';
631 .docblock
a:not
(.srclink
):not
(.test-arrow
):hover
,
632 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
633 text-decoration: underline
;
636 .invisible > .srclink, h4 > code + .srclink {
644 .block a.current.crate { font-weight: 500; }
649 .search-container > div {
650 display: inline-flex
;
651 width: calc
(100% - 34px);
660 border-radius: 4px 0 0 4px;
663 border-right: 1px solid
;
664 -moz-appearance: none
;
665 -webkit-appearance: none
;
666 /* Removes default arrow from firefox */
669 background-repeat: no-repeat
;
670 background-color: transparent
;
671 background-size: 20px;
672 background-position: calc
(100% - 1px) 56%;
674 .search-container > .top-button {
680 /* Override Normalize.css: we have margins and do
681 not want to overflow - the `moz` attribute is necessary
682 until Firefox 29, too early to drop at this point */
683 -moz-box-sizing: border-box
!important
;
684 box-sizing: border-box
!important
;
691 transition: border-color
300ms ease
;
692 transition: border-radius
300ms ease-in-out
;
693 transition: box-shadow
300ms ease-in-out
;
697 #crate-search + .search-input
{
698 border-radius: 0 1px 1px 0;
699 width: calc
(100% - 32px);
702 .search-input:focus {
708 .search-results .desc {
710 text-overflow: ellipsis
;
719 .content .search-results td:first-child {
723 .content .search-results td:first-child a {
726 .content .search-results td:first-child a:after {
731 .content .search-results td:first-child a span {
735 tr
.result span
.primitive::after
{
736 content: ' (primitive type)';
740 tr
.result span
.keyword::after
{
741 content: ' (keyword)';
745 body
.blur
> :not
(#help
) {
747 -webkit-filter: blur
(8px);
758 justify-content: center
;
763 box-shadow: 0 0 6px rgba
(0,0,0,.2);
773 #help dd
{ margin: 5px 35px; }
774 #help .infos
{ padding-left: 0; }
775 #help h1
, #help h2
{ margin-top: 0; }
805 display: inline-block
;
811 vertical-align: text-bottom
;
814 .module-item.unstable {
826 .impl-items .since, .impl .since {
833 .impl-items .srclink, .impl .srclink {
835 /* Override header settings otherwise it's too bold */
840 .impl-items code, .impl code {
844 .impl-items h4, h4.impl, h3.impl {
849 /* Push the src link out to the right edge consistently */
850 justify-content: space-between
;
857 .variants_table tbody tr td:first-child {
858 width: 1%; /* make the variant name as small as possible */
869 pre
.rust
.question-mark
{
874 display: inline-block
;
876 padding: 5px 10px 5px 10px;
883 text-decoration: none
;
886 .section-header:hover a:before {
889 padding-right: 10px; /* avoid gap that causes hover to disappear */
890 content: '\2002\00a7\2002';
893 .section-header:hover a {
894 text-decoration: none
;
908 h3
> .collapse-toggle
, h4
> .collapse-toggle
{
913 .toggle-wrapper > .collapse-toggle {
923 .toggle-wrapper.collapsed {
925 transition: height
.2s;
929 .collapse-toggle > .inner {
930 display: inline-block
;
935 .collapse-toggle.hidden-default {
950 .out-of-band > span.since {
956 .toggle-wrapper > .collapse-toggle {
960 .variant + .toggle-wrapper + .docblock > p {
964 .sub-variant, .sub-variant > h3 {
965 margin-top: 1px !important
;
968 #main > .sub-variant
> h3
{
979 .sub-variant > div > span {
985 display: inline-block
;
990 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
996 .docblock > .section-header:first-child {
1001 .docblock > .section-header:first-child:hover > a:before {
1005 .enum > .collapsed, .struct > .collapsed {
1006 margin-bottom: 25px;
1009 #main > .variant
, #main
> .structfield
{
1015 margin-top: 0px !important
;
1017 margin-bottom: 0px !important
;
1020 .toggle-attributes.collapsed {
1023 .impl-items > .toggle-attributes {
1026 .impl-items .attributes {
1043 display: inline-block
;
1047 .tooltip .tooltiptext {
1059 .tooltip:hover .tooltiptext {
1063 .tooltip .tooltiptext::after {
1070 border-style: solid
;
1073 .important-traits .tooltip .tooltiptext {
1088 .search-failed > ul {
1105 border-top: 2px solid
;
1108 #titles > div:not
(:last-child
) {
1110 width: calc
(33.3% - 1px);
1113 #titles > div
> div
.count
{
1114 display: inline-block
;
1123 h4
> .important-traits
{
1133 margin-bottom: 10px;
1147 border-top-right-radius: 3px;
1148 border-bottom-right-radius: 3px;
1151 transition: left
.5s;
1164 transition: left
.5s;
1165 border-right: 1px solid
;
1167 #source-sidebar > .title
{
1170 border-bottom: 1px solid
;
1180 .theme-picker button {
1191 #theme-picker, #settings-menu
{
1211 #theme-choices > button
{
1216 background: rgba
(0,0,0,0);
1219 #theme-choices > button:not
(:first-child
) {
1220 border-top: 1px solid
;
1225 @media (max-width: 700px) {
1230 .rustdoc > .sidebar {
1240 .sidebar > .location {
1244 padding: 3px 10px 1px 10px;
1246 background: inherit
;
1251 .sidebar .location:empty {
1255 .sidebar .logo-container {
1264 .sidebar .logo-container > img {
1278 border-bottom: 1px solid
;
1279 border-right: 1px solid
;
1283 .rustdoc.source > .sidebar > .sidebar-menu {
1294 border-right: 1px solid
;
1298 .sidebar > .block.version {
1299 border-bottom: none
;
1304 width: calc
(100% - 32px);
1321 .content h4 > .out-of-band {
1325 .toggle-wrapper > .collapse-toggle {
1337 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1342 display: none
!important
;
1355 h4
> .important-traits
{
1361 #titles > div
> div
.count
{
1374 background-color: rgba
(0,0,0,0);
1378 width: calc
(100% + 30px);
1386 .show-it > .block.items {
1390 .show-it > .block.items > ul {
1394 .show-it > .block.items > ul > li {
1399 .show-it > .block.items > ul > li > a {
1403 /* Because of ios, we need to actually have a full height sidebar title so the
1404 * actual sidebar can show up. But then we need to make it transparent so we don't
1405 * hide content. The filler just allows to create the background for the sidebar
1406 * title. But because of the absolute position, I had to lower the z-index.
1411 width: calc
(100% - 45px);
1415 border-bottom: 1px solid
;
1422 .impl > .collapse-toggle {
1442 #main > .line-numbers
{
1448 nav
.sub
, .content
.out-of-band
, .collapse-toggle
{
1453 @media (max-width: 416px) {
1480 transform: translate
(-50%, -40%);
1483 border-top-right-radius: 0;
1486 .modal-content > .docblock {
1492 margin-bottom: 13px;
1496 .modal-content > .docblock > code.content {
1502 .modal-content > .close {
1510 border-top-right-radius: 5px;
1511 border-bottom-right-radius: 5px;
1518 .modal-content > .whiter {
1526 #main > div
.important-traits
{
1532 .content > .methods > .method > div.important-traits {
1540 display: inline-block
;
1542 font: 15px monospace
;
1544 vertical-align: middle
;
1547 box-shadow: inset
0 -1px 0;
1551 .hidden-by-impl-hider
,
1552 .hidden-by-usual-hider {
1553 /* important because of conflicting rule for small screens */
1554 display: none
!important
;
1557 #implementations-list > h3
> span
.in-band
{
1564 border-collapse: collapse
;
1569 .table-display tr td:first-child {
1573 .table-display tr td:last-child {
1576 .table-display .out-of-band {
1581 #implementors-list > .impl-items
.table-display
.out-of-band
{
1585 .table-display td:hover .anchor {
1615 div
.files
> a:hover
, div
.name:hover
{
1616 background-color: #a14b4b;
1618 div
.name
.expand
+ .children
{
1629 div
.name
.expand::before
{
1630 transform: rotate
(90deg);
1635 /* This part is to fix the "Expand attributes" part in the type declaration. */
1636 .type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1637 margin-left: 0 !important
;
1639 .type-decl > pre > .docblock.attributes.top-attr {
1640 margin-left: 1.8em !important
;
1642 .type-decl > pre > .toggle-attributes {
1645 .type-decl > pre > .docblock.attributes {