rustdoc.css 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365
  1. /**
  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.
  5. *
  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.
  11. */
  12. /* See FiraSans-LICENSE.txt for the Fira Sans license. */
  13. @font-face {
  14. font-family: 'Fira Sans';
  15. font-style: normal;
  16. font-weight: 400;
  17. src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
  18. }
  19. @font-face {
  20. font-family: 'Fira Sans';
  21. font-style: normal;
  22. font-weight: 500;
  23. src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
  24. }
  25. /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license and
  26. * Heuristica-LICENSE.txt for the Heuristica license. */
  27. @font-face {
  28. font-family: 'Source Serif Pro';
  29. font-style: normal;
  30. font-weight: 400;
  31. src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
  32. }
  33. @font-face {
  34. font-family: 'Source Serif Pro';
  35. font-style: italic;
  36. font-weight: 400;
  37. src: url("Heuristica-Italic.woff") format('woff');
  38. }
  39. @font-face {
  40. font-family: 'Source Serif Pro';
  41. font-style: normal;
  42. font-weight: 700;
  43. src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
  44. }
  45. /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
  46. @font-face {
  47. font-family: 'Source Code Pro';
  48. font-style: normal;
  49. font-weight: 400;
  50. /* Avoid using locally installed font because bad versions are in circulation:
  51. * see https://github.com/rust-lang/rust/issues/24355 */
  52. src: url("SourceCodePro-Regular.woff") format('woff');
  53. }
  54. @font-face {
  55. font-family: 'Source Code Pro';
  56. font-style: normal;
  57. font-weight: 600;
  58. src: url("SourceCodePro-Semibold.woff") format('woff');
  59. }
  60. * {
  61. -webkit-box-sizing: border-box;
  62. -moz-box-sizing: border-box;
  63. box-sizing: border-box;
  64. }
  65. /* General structure and fonts */
  66. body {
  67. font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
  68. margin: 0;
  69. position: relative;
  70. padding: 10px 15px 20px 15px;
  71. -webkit-font-feature-settings: "kern", "liga";
  72. -moz-font-feature-settings: "kern", "liga";
  73. font-feature-settings: "kern", "liga";
  74. }
  75. h1 {
  76. font-size: 1.5em;
  77. }
  78. h2 {
  79. font-size: 1.4em;
  80. }
  81. h3 {
  82. font-size: 1.3em;
  83. }
  84. h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
  85. font-weight: 500;
  86. margin: 20px 0 15px 0;
  87. padding-bottom: 6px;
  88. }
  89. h1.fqn {
  90. border-bottom: 1px dashed;
  91. margin-top: 0;
  92. position: relative;
  93. }
  94. h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
  95. border-bottom: 1px solid;
  96. }
  97. h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
  98. font-weight: 600;
  99. margin-top: 10px;
  100. margin-bottom: 10px;
  101. position: relative;
  102. }
  103. h3.impl, h3.method, h3.type {
  104. padding-left: 15px;
  105. }
  106. h1, h2, h3, h4,
  107. .sidebar, a.source, .search-input, .content table :not(code)>a,
  108. .collapse-toggle, ul.item-list > li > .out-of-band {
  109. font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  110. }
  111. ol, ul {
  112. padding-left: 25px;
  113. }
  114. ul ul, ol ul, ul ol, ol ol {
  115. margin-bottom: 0;
  116. }
  117. p {
  118. margin: 0 0 .6em 0;
  119. }
  120. summary {
  121. outline: none;
  122. }
  123. code, pre {
  124. font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
  125. white-space: pre-wrap;
  126. }
  127. .docblock code, .docblock-short code {
  128. border-radius: 3px;
  129. padding: 0 0.2em;
  130. }
  131. .docblock pre code, .docblock-short pre code, .docblock code.spotlight {
  132. padding: 0;
  133. }
  134. .docblock code.spotlight :last-child {
  135. padding-bottom: 0.6em;
  136. }
  137. pre {
  138. padding: 14px;
  139. }
  140. .source .content pre {
  141. padding: 20px;
  142. }
  143. img {
  144. max-width: 100%;
  145. }
  146. .source .content {
  147. margin-top: 50px;
  148. max-width: none;
  149. overflow: visible;
  150. margin-left: 0px;
  151. min-width: 70em;
  152. }
  153. nav.sub {
  154. font-size: 16px;
  155. text-transform: uppercase;
  156. }
  157. .sidebar {
  158. width: 200px;
  159. position: fixed;
  160. left: 0;
  161. top: 0;
  162. height: 100vh;
  163. overflow: auto;
  164. }
  165. .sidebar .block > ul > li {
  166. margin-right: -10px;
  167. }
  168. .content, nav {
  169. max-width: 960px;
  170. }
  171. /* Everything else */
  172. .js-only, .hidden {
  173. display: none !important;
  174. }
  175. .sidebar img {
  176. margin: 20px auto;
  177. display: block;
  178. margin-top: 10px;
  179. }
  180. .sidebar .location {
  181. border: 1px solid;
  182. font-size: 17px;
  183. margin: 30px 10px 20px 10px;
  184. text-align: center;
  185. word-wrap: break-word;
  186. }
  187. .sidebar .version {
  188. font-size: 15px;
  189. text-align: center;
  190. border-bottom: 1px solid;
  191. overflow-wrap: break-word;
  192. word-wrap: break-word; /* deprecated */
  193. word-break: break-word; /* Chrome, non-standard */
  194. }
  195. .location:empty {
  196. border: none;
  197. }
  198. .location a:first-child {
  199. font-weight: 500;
  200. }
  201. .block {
  202. padding: 0;
  203. margin-bottom: 14px;
  204. }
  205. .block h2, .block h3 {
  206. margin-top: 0;
  207. margin-bottom: 8px;
  208. text-align: center;
  209. }
  210. .block ul, .block li {
  211. margin: 0 10px;
  212. padding: 0;
  213. list-style: none;
  214. }
  215. .block a {
  216. display: block;
  217. text-overflow: ellipsis;
  218. overflow: hidden;
  219. line-height: 15px;
  220. padding: 7px 5px;
  221. font-size: 14px;
  222. font-weight: 300;
  223. transition: border 500ms ease-out;
  224. }
  225. .sidebar-title {
  226. border-top: 1px solid;
  227. border-bottom: 1px solid;
  228. text-align: center;
  229. font-size: 17px;
  230. margin-bottom: 5px;
  231. }
  232. .sidebar-links {
  233. margin-bottom: 15px;
  234. }
  235. .sidebar-links > a {
  236. padding-left: 10px;
  237. width: 100%;
  238. }
  239. .sidebar-menu {
  240. display: none;
  241. }
  242. .content {
  243. padding: 15px 0;
  244. }
  245. .source .content pre.rust {
  246. white-space: pre;
  247. overflow: auto;
  248. padding-left: 0;
  249. }
  250. #search {
  251. margin-left: 230px;
  252. position: relative;
  253. }
  254. #results {
  255. position: absolute;
  256. right: 0;
  257. left: 0;
  258. overflow: auto;
  259. }
  260. #results > table {
  261. width: 100%;
  262. table-layout: fixed;
  263. }
  264. .content pre.line-numbers {
  265. float: left;
  266. border: none;
  267. position: relative;
  268. -webkit-user-select: none;
  269. -moz-user-select: none;
  270. -ms-user-select: none;
  271. user-select: none;
  272. }
  273. .line-numbers span {
  274. cursor: pointer;
  275. }
  276. .docblock-short p {
  277. display: inline;
  278. }
  279. .docblock-short.nowrap {
  280. display: block;
  281. overflow: hidden;
  282. white-space: nowrap;
  283. text-overflow: ellipsis;
  284. }
  285. .docblock-short p {
  286. overflow: hidden;
  287. text-overflow: ellipsis;
  288. margin: 0;
  289. }
  290. .docblock-short code {
  291. white-space: nowrap;
  292. }
  293. .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
  294. border-bottom: 1px solid;
  295. }
  296. #main > .docblock h1 { font-size: 1.3em; }
  297. #main > .docblock h2 { font-size: 1.15em; }
  298. #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
  299. .docblock h1 { font-size: 1em; }
  300. .docblock h2 { font-size: 0.95em; }
  301. .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
  302. .docblock {
  303. margin-left: 24px;
  304. position: relative;
  305. }
  306. .content .out-of-band {
  307. font-size: 23px;
  308. margin: 0px;
  309. padding: 0px;
  310. text-align: right;
  311. display: inline-block;
  312. font-weight: normal;
  313. position: absolute;
  314. right: 0;
  315. }
  316. h3.impl > .out-of-band {
  317. font-size: 21px;
  318. }
  319. h4.method > .out-of-band {
  320. font-size: 19px;
  321. }
  322. ul.item-list > li > .out-of-band {
  323. font-size: 19px;
  324. }
  325. h4 > code, h3 > code, .invisible > code {
  326. max-width: calc(100% - 41px);
  327. display: block;
  328. }
  329. .in-band, code {
  330. z-index: 5;
  331. }
  332. .invisible {
  333. width: 100%;
  334. display: inline-block;
  335. }
  336. .content .in-band {
  337. margin: 0px;
  338. padding: 0px;
  339. }
  340. .in-band > code {
  341. display: inline-block;
  342. }
  343. #main {
  344. position: relative;
  345. }
  346. #main > .since {
  347. top: inherit;
  348. font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  349. }
  350. .content table:not(.table-display) {
  351. border-spacing: 0 5px;
  352. border-collapse: separate;
  353. }
  354. .content td { vertical-align: top; }
  355. .content td:first-child { padding-right: 20px; }
  356. .content td p:first-child { margin-top: 0; }
  357. .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
  358. .docblock table {
  359. border: 1px solid;
  360. margin: .5em 0;
  361. border-collapse: collapse;
  362. width: 100%;
  363. }
  364. .docblock table td {
  365. padding: .5em;
  366. border-top: 1px dashed;
  367. border-bottom: 1px dashed;
  368. }
  369. .docblock table th {
  370. padding: .5em;
  371. text-align: left;
  372. border-top: 1px solid;
  373. border-bottom: 1px solid;
  374. }
  375. .fields + table {
  376. margin-bottom: 1em;
  377. }
  378. .content .item-list {
  379. list-style-type: none;
  380. padding: 0;
  381. }
  382. .content .item-list li {
  383. margin-bottom: 1em;
  384. }
  385. .content .multi-column {
  386. -moz-column-count: 5;
  387. -moz-column-gap: 2.5em;
  388. -webkit-column-count: 5;
  389. -webkit-column-gap: 2.5em;
  390. column-count: 5;
  391. column-gap: 2.5em;
  392. }
  393. .content .multi-column li { width: 100%; display: inline-block; }
  394. .content .method {
  395. font-size: 1em;
  396. position: relative;
  397. }
  398. /* Shift "where ..." part of method or fn definition down a line */
  399. .content .method .where,
  400. .content .fn .where,
  401. .content .where.fmt-newline {
  402. display: block;
  403. font-size: 0.8em;
  404. }
  405. .content .methods > div:not(.important-traits) {
  406. margin-left: 40px;
  407. margin-bottom: 15px;
  408. }
  409. .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
  410. margin-left: 20px;
  411. }
  412. .content .impl-items .docblock, .content .impl-items .stability {
  413. margin-bottom: .6em;
  414. }
  415. .content .docblock > .impl-items {
  416. margin-left: 20px;
  417. margin-top: -34px;
  418. }
  419. .content .docblock > .impl-items > h4 {
  420. border-bottom: 0;
  421. }
  422. .content .docblock >.impl-items .table-display {
  423. margin: 0;
  424. }
  425. .content .docblock >.impl-items table td {
  426. padding: 0;
  427. }
  428. .toggle-wrapper.marg-left > .collapse-toggle {
  429. left: -24px;
  430. }
  431. .content .docblock > .impl-items .table-display, .impl-items table td {
  432. border: none;
  433. }
  434. .content .stability code {
  435. font-size: 90%;
  436. }
  437. nav {
  438. border-bottom: 1px solid;
  439. padding-bottom: 10px;
  440. margin-bottom: 10px;
  441. }
  442. nav.main {
  443. padding: 20px 0;
  444. text-align: center;
  445. }
  446. nav.main .current {
  447. border-top: 1px solid;
  448. border-bottom: 1px solid;
  449. }
  450. nav.main .separator {
  451. border: 1px solid;
  452. display: inline-block;
  453. height: 23px;
  454. margin: 0 20px;
  455. }
  456. nav.sum { text-align: right; }
  457. nav.sub form { display: inline; }
  458. nav.sub, .content {
  459. margin-left: 230px;
  460. }
  461. a {
  462. text-decoration: none;
  463. background: transparent;
  464. }
  465. .small-section-header:hover > .anchor {
  466. display: initial;
  467. }
  468. .in-band:hover > .anchor {
  469. display: inline-block;
  470. position: absolute;
  471. }
  472. .anchor {
  473. display: none;
  474. position: absolute;
  475. left: -7px;
  476. }
  477. .anchor.field {
  478. left: -5px;
  479. }
  480. .small-section-header > .anchor {
  481. left: -20px;
  482. }
  483. .small-section-header > .anchor:not(.field) {
  484. left: -28px;
  485. }
  486. .anchor:before {
  487. content: '\2002\00a7\2002';
  488. }
  489. .docblock a:not(.srclink):not(.test-arrow):hover,
  490. .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
  491. text-decoration: underline;
  492. }
  493. .block a.current.crate { font-weight: 500; }
  494. .search-container {
  495. position: relative;
  496. }
  497. .search-container > .top-button {
  498. position: absolute;
  499. right: 0;
  500. top: 10px;
  501. }
  502. .search-input {
  503. width: calc(100% - 34px);
  504. /* Override Normalize.css: we have margins and do
  505. not want to overflow - the `moz` attribute is necessary
  506. until Firefox 29, too early to drop at this point */
  507. -moz-box-sizing: border-box !important;
  508. box-sizing: border-box !important;
  509. outline: none;
  510. border: none;
  511. border-radius: 1px;
  512. margin-top: 5px;
  513. padding: 10px 16px;
  514. font-size: 17px;
  515. transition: border-color 300ms ease;
  516. transition: border-radius 300ms ease-in-out;
  517. transition: box-shadow 300ms ease-in-out;
  518. }
  519. .search-input:focus {
  520. border-radius: 2px;
  521. border: 0;
  522. outline: 0;
  523. box-shadow: 0 0 8px #078dd8;
  524. }
  525. .search-results .desc {
  526. white-space: nowrap;
  527. text-overflow: ellipsis;
  528. overflow: hidden;
  529. display: block;
  530. }
  531. .search-results a {
  532. display: block;
  533. }
  534. .content .search-results td:first-child {
  535. padding-right: 0;
  536. width: 75%;
  537. }
  538. .content .search-results td:first-child a {
  539. padding-right: 10px;
  540. }
  541. .content .search-results td:first-child a span {
  542. float: left;
  543. }
  544. tr.result span.primitive::after {
  545. content: ' (primitive type)';
  546. font-style: italic;
  547. }
  548. tr.result span.keyword::after {
  549. content: ' (keyword)';
  550. font-style: italic;
  551. }
  552. body.blur > :not(#help) {
  553. filter: blur(8px);
  554. -webkit-filter: blur(8px);
  555. opacity: .7;
  556. }
  557. #help {
  558. width: 100%;
  559. height: 100vh;
  560. position: fixed;
  561. top: 0;
  562. left: 0;
  563. display: flex;
  564. justify-content: center;
  565. align-items: center;
  566. }
  567. #help > div {
  568. flex: 0 0 auto;
  569. box-shadow: 0 0 6px rgba(0,0,0,.2);
  570. width: 550px;
  571. height: auto;
  572. border: 1px solid;
  573. }
  574. #help dt {
  575. float: left;
  576. clear: left;
  577. display: block;
  578. }
  579. #help dd { margin: 5px 35px; }
  580. #help .infos { padding-left: 0; }
  581. #help h1, #help h2 { margin-top: 0; }
  582. #help > div div {
  583. width: 50%;
  584. float: left;
  585. padding: 20px;
  586. padding-left: 17px;
  587. }
  588. .stab {
  589. display: table;
  590. border-width: 1px;
  591. border-style: solid;
  592. padding: 3px;
  593. margin-bottom: 5px;
  594. font-size: 90%;
  595. }
  596. .stab p {
  597. display: inline;
  598. }
  599. .stab summary {
  600. display: list-item;
  601. }
  602. .stab .microscope {
  603. font-size: 1.5em;
  604. }
  605. .module-item .stab {
  606. display: inline;
  607. border-width: 0;
  608. padding: 0;
  609. margin: 0;
  610. background: inherit !important;
  611. }
  612. .module-item.unstable {
  613. opacity: 0.65;
  614. }
  615. .since {
  616. font-weight: normal;
  617. font-size: initial;
  618. position: absolute;
  619. right: 0;
  620. top: 0;
  621. }
  622. .variants_table {
  623. width: 100%;
  624. }
  625. .variants_table tbody tr td:first-child {
  626. width: 1%; /* make the variant name as small as possible */
  627. }
  628. td.summary-column {
  629. width: 100%;
  630. }
  631. .summary {
  632. padding-right: 0px;
  633. }
  634. pre.rust .question-mark {
  635. font-weight: bold;
  636. }
  637. a.test-arrow {
  638. display: inline-block;
  639. position: absolute;
  640. padding: 5px 10px 5px 10px;
  641. border-radius: 5px;
  642. font-size: 130%;
  643. top: 5px;
  644. right: 5px;
  645. }
  646. a.test-arrow:hover{
  647. text-decoration: none;
  648. }
  649. .section-header:hover a:before {
  650. position: absolute;
  651. left: -25px;
  652. content: '\2002\00a7\2002';
  653. }
  654. .section-header:hover a {
  655. text-decoration: none;
  656. }
  657. .section-header a {
  658. color: inherit;
  659. }
  660. .collapse-toggle {
  661. font-weight: 300;
  662. position: absolute;
  663. left: -23px;
  664. top: 0;
  665. }
  666. h3 > .collapse-toggle, h4 > .collapse-toggle {
  667. font-size: 0.8em;
  668. top: 5px;
  669. }
  670. .toggle-wrapper > .collapse-toggle {
  671. left: -24px;
  672. margin-top: 0px;
  673. }
  674. .toggle-wrapper {
  675. position: relative;
  676. margin-top: 0;
  677. }
  678. .toggle-wrapper.collapsed {
  679. height: 25px;
  680. transition: height .2s;
  681. margin-bottom: .6em;
  682. }
  683. .collapse-toggle > .inner {
  684. display: inline-block;
  685. width: 1.2ch;
  686. text-align: center;
  687. }
  688. .ghost {
  689. display: none;
  690. }
  691. .ghost + .since {
  692. position: initial;
  693. display: table-cell;
  694. }
  695. .since + .srclink {
  696. display: table-cell;
  697. padding-left: 10px;
  698. }
  699. .item-spacer {
  700. width: 100%;
  701. height: 12px;
  702. }
  703. span.since {
  704. position: initial;
  705. font-size: 20px;
  706. margin-right: 5px;
  707. }
  708. .toggle-wrapper > .collapse-toggle {
  709. left: 0;
  710. }
  711. .variant + .toggle-wrapper + .docblock > p {
  712. margin-top: 5px;
  713. }
  714. .sub-variant, .sub-variant > h3 {
  715. margin-top: 0 !important;
  716. }
  717. .toggle-label {
  718. display: inline-block;
  719. margin-left: 4px;
  720. margin-top: 3px;
  721. }
  722. .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
  723. margin-left: 30px;
  724. margin-bottom: 20px;
  725. margin-top: 5px;
  726. }
  727. .docblock > .section-header:first-child {
  728. margin-left: 15px;
  729. margin-top: 0;
  730. }
  731. .docblock > .section-header:first-child:hover > a:before {
  732. left: -10px;
  733. }
  734. .enum > .collapsed, .struct > .collapsed {
  735. margin-bottom: 25px;
  736. }
  737. #main > .variant, #main > .structfield {
  738. display: block;
  739. }
  740. .attributes {
  741. display: block;
  742. margin-top: 0px !important;
  743. margin-right: 0px;
  744. margin-bottom: 0px !important;
  745. margin-left: 30px;
  746. }
  747. .toggle-attributes.collapsed {
  748. margin-bottom: 0;
  749. }
  750. .impl-items > .toggle-attributes {
  751. margin-left: 20px;
  752. }
  753. .impl-items .attributes {
  754. font-weight: 500;
  755. }
  756. :target > code {
  757. opacity: 1;
  758. }
  759. /* Media Queries */
  760. @media (max-width: 700px) {
  761. body {
  762. padding-top: 0px;
  763. }
  764. .sidebar {
  765. height: 45px;
  766. min-height: 40px;
  767. width: calc(100% + 30px);
  768. margin: 0;
  769. margin-left: -15px;
  770. padding: 0 15px;
  771. position: static;
  772. z-index: 1;
  773. }
  774. .sidebar > .location {
  775. float: right;
  776. margin: 0px;
  777. margin-top: 2px;
  778. padding: 3px 10px 1px 10px;
  779. min-height: 39px;
  780. background: inherit;
  781. text-align: left;
  782. font-size: 24px;
  783. }
  784. .sidebar .location:empty {
  785. padding: 0;
  786. }
  787. .sidebar img {
  788. width: 35px;
  789. margin-top: 5px;
  790. margin-bottom: 5px;
  791. float: left;
  792. margin-left: 50px;
  793. }
  794. .sidebar-menu {
  795. position: fixed;
  796. z-index: 10;
  797. font-size: 2rem;
  798. cursor: pointer;
  799. width: 45px;
  800. left: 0;
  801. text-align: center;
  802. display: block;
  803. border-bottom: 1px solid;
  804. border-right: 1px solid;
  805. height: 45px;
  806. }
  807. .sidebar-elems {
  808. position: fixed;
  809. z-index: 1;
  810. left: 0;
  811. top: 45px;
  812. bottom: 0;
  813. overflow-y: auto;
  814. border-right: 1px solid;
  815. display: none;
  816. }
  817. .sidebar > .block.version {
  818. border-bottom: none;
  819. margin-top: 12px;
  820. }
  821. nav.sub {
  822. width: calc(100% - 32px);
  823. float: right;
  824. }
  825. .content {
  826. margin-left: 0px;
  827. }
  828. #main {
  829. margin-top: 45px;
  830. padding: 0;
  831. }
  832. .content .in-band {
  833. width: 100%;
  834. }
  835. .content h4 > .out-of-band {
  836. position: inherit;
  837. }
  838. .toggle-wrapper > .collapse-toggle {
  839. left: 0px;
  840. }
  841. .toggle-wrapper {
  842. height: 1.5em;
  843. }
  844. #search {
  845. margin-left: 0;
  846. }
  847. .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
  848. display: flex;
  849. }
  850. .anchor {
  851. display: none !important;
  852. }
  853. }
  854. @media print {
  855. nav.sub, .content .out-of-band, .collapse-toggle {
  856. display: none;
  857. }
  858. }
  859. .information {
  860. position: absolute;
  861. left: -20px;
  862. margin-top: 7px;
  863. z-index: 1;
  864. }
  865. .tooltip {
  866. position: relative;
  867. display: inline-block;
  868. cursor: pointer;
  869. }
  870. .tooltip .tooltiptext {
  871. width: 120px;
  872. display: none;
  873. text-align: center;
  874. padding: 5px 3px;
  875. border-radius: 6px;
  876. margin-left: 5px;
  877. top: -5px;
  878. left: 105%;
  879. z-index: 1;
  880. }
  881. .tooltip:hover .tooltiptext {
  882. display: inline;
  883. }
  884. .tooltip .tooltiptext::after {
  885. content: " ";
  886. position: absolute;
  887. top: 50%;
  888. left: 11px;
  889. margin-top: -5px;
  890. border-width: 5px;
  891. border-style: solid;
  892. }
  893. .important-traits .tooltip .tooltiptext {
  894. border: 1px solid;
  895. }
  896. pre.rust {
  897. position: relative;
  898. tab-width: 4;
  899. -moz-tab-width: 4;
  900. }
  901. .search-failed {
  902. text-align: center;
  903. margin-top: 20px;
  904. }
  905. #titles {
  906. height: 35px;
  907. }
  908. #titles > div {
  909. float: left;
  910. width: 33.3%;
  911. text-align: center;
  912. border-bottom: 1px solid;
  913. font-size: 18px;
  914. cursor: pointer;
  915. }
  916. #titles > div.selected {
  917. border-bottom: 3px solid;
  918. }
  919. #titles > div:hover {
  920. border-bottom: 3px solid;
  921. }
  922. #titles > div > div.count {
  923. display: inline-block;
  924. font-size: 16px;
  925. }
  926. .important-traits {
  927. cursor: pointer;
  928. z-index: 2;
  929. }
  930. h4 > .important-traits {
  931. position: absolute;
  932. left: -44px;
  933. top: 2px;
  934. }
  935. @media (max-width: 700px) {
  936. h4 > .important-traits {
  937. position: absolute;
  938. left: -22px;
  939. top: 24px;
  940. }
  941. #titles > div > div.count {
  942. float: left;
  943. width: 100%;
  944. }
  945. #titles {
  946. height: 50px;
  947. }
  948. .sidebar.mobile {
  949. position: fixed;
  950. width: 100%;
  951. margin-left: 0;
  952. background-color: rgba(0,0,0,0);
  953. height: 100%;
  954. }
  955. .show-it {
  956. display: block;
  957. width: 246px;
  958. }
  959. .show-it > .block.items {
  960. margin: 8px 0;
  961. }
  962. .show-it > .block.items > ul {
  963. margin: 0;
  964. }
  965. .show-it > .block.items > ul > li {
  966. text-align: center;
  967. margin: 2px 0;
  968. }
  969. .show-it > .block.items > ul > li > a {
  970. font-size: 21px;
  971. }
  972. /* Because of ios, we need to actually have a full height sidebar title so the
  973. * actual sidebar can show up. But then we need to make it transparent so we don't
  974. * hide content. The filler just allows to create the background for the sidebar
  975. * title. But because of the absolute position, I had to lower the z-index.
  976. */
  977. #sidebar-filler {
  978. position: fixed;
  979. left: 45px;
  980. width: calc(100% - 45px);
  981. top: 0;
  982. height: 45px;
  983. z-index: -1;
  984. border-bottom: 1px solid;
  985. }
  986. .collapse-toggle {
  987. left: -20px;
  988. }
  989. .impl > .collapse-toggle {
  990. left: -10px;
  991. }
  992. }
  993. @media (max-width: 416px) {
  994. #titles {
  995. height: 73px;
  996. }
  997. #titles > div {
  998. height: 73px;
  999. }
  1000. }
  1001. .modal {
  1002. position: fixed;
  1003. width: 100vw;
  1004. height: 100vh;
  1005. z-index: 10000;
  1006. top: 0;
  1007. left: 0;
  1008. }
  1009. .modal-content {
  1010. display: block;
  1011. max-width: 60%;
  1012. min-width: 200px;
  1013. padding: 8px;
  1014. top: 40%;
  1015. position: absolute;
  1016. left: 50%;
  1017. transform: translate(-50%, -40%);
  1018. border: 1px solid;
  1019. border-radius: 4px;
  1020. border-top-right-radius: 0;
  1021. }
  1022. .modal-content > .docblock {
  1023. margin: 0;
  1024. }
  1025. h3.important {
  1026. margin: 0;
  1027. margin-bottom: 13px;
  1028. font-size: 19px;
  1029. }
  1030. .modal-content > .docblock > code.content {
  1031. margin: 0;
  1032. padding: 0;
  1033. font-size: 20px;
  1034. }
  1035. .modal-content > .close {
  1036. position: absolute;
  1037. font-weight: 900;
  1038. right: -25px;
  1039. top: -1px;
  1040. font-size: 18px;
  1041. width: 25px;
  1042. padding-right: 2px;
  1043. border-top-right-radius: 5px;
  1044. border-bottom-right-radius: 5px;
  1045. text-align: center;
  1046. border: 1px solid;
  1047. border-right: 0;
  1048. cursor: pointer;
  1049. }
  1050. .modal-content > .whiter {
  1051. height: 25px;
  1052. position: absolute;
  1053. width: 3px;
  1054. right: -2px;
  1055. top: 0px;
  1056. }
  1057. #main > div.important-traits {
  1058. position: absolute;
  1059. left: -24px;
  1060. margin-top: 16px;
  1061. }
  1062. .content > .methods > div.important-traits {
  1063. position: absolute;
  1064. left: -42px;
  1065. margin-top: 2px;
  1066. }
  1067. kbd {
  1068. display: inline-block;
  1069. padding: 3px 5px;
  1070. font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  1071. line-height: 10px;
  1072. vertical-align: middle;
  1073. border: solid 1px;
  1074. border-radius: 3px;
  1075. box-shadow: inset 0 -1px 0;
  1076. cursor: default;
  1077. }
  1078. .theme-picker {
  1079. position: absolute;
  1080. left: 211px;
  1081. top: 19px;
  1082. }
  1083. .theme-picker button {
  1084. outline: none;
  1085. }
  1086. #settings-menu {
  1087. position: absolute;
  1088. right: 0;
  1089. top: 10px;
  1090. outline: none;
  1091. }
  1092. #theme-picker, #settings-menu {
  1093. padding: 4px;
  1094. width: 27px;
  1095. height: 29px;
  1096. border: 1px solid;
  1097. border-radius: 3px;
  1098. cursor: pointer;
  1099. }
  1100. #theme-choices {
  1101. display: none;
  1102. position: absolute;
  1103. left: 0;
  1104. top: 28px;
  1105. border: 1px solid;
  1106. border-radius: 3px;
  1107. z-index: 1;
  1108. cursor: pointer;
  1109. }
  1110. #theme-choices > button {
  1111. border: none;
  1112. width: 100%;
  1113. padding: 4px;
  1114. text-align: center;
  1115. background: rgba(0,0,0,0);
  1116. }
  1117. #theme-choices > button:not(:first-child) {
  1118. border-top: 1px solid;
  1119. }
  1120. @media (max-width: 700px) {
  1121. .theme-picker {
  1122. left: 10px;
  1123. top: 54px;
  1124. z-index: 1;
  1125. }
  1126. }
  1127. .hidden-by-impl-hider,
  1128. .hidden-by-usual-hider {
  1129. /* important because of conflicting rule for small screens */
  1130. display: none !important;
  1131. }
  1132. #implementations-list > h3 > span.in-band {
  1133. width: 100%;
  1134. }
  1135. .table-display {
  1136. width: 100%;
  1137. border: 0;
  1138. border-collapse: collapse;
  1139. border-spacing: 0;
  1140. font-size: 16px;
  1141. }
  1142. .table-display tr td:first-child {
  1143. padding-right: 0;
  1144. }
  1145. .table-display tr td:last-child {
  1146. float: right;
  1147. }
  1148. .table-display .out-of-band {
  1149. position: relative;
  1150. font-size: 19px;
  1151. display: block;
  1152. }
  1153. #main > ul {
  1154. padding-left: 10px;
  1155. }
  1156. #main > ul > li {
  1157. list-style: none;
  1158. }
  1159. #all-types {
  1160. text-align: center;
  1161. border: 1px solid;
  1162. margin: 0 10px;
  1163. margin-bottom: 10px;
  1164. display: block;
  1165. border-radius: 7px;
  1166. }
  1167. #all-types > p {
  1168. margin: 5px 0;
  1169. }