rustdoc.css 20 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  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. margin-top: 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: -20px;
  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. .content pre.line-numbers {
  261. float: left;
  262. border: none;
  263. position: relative;
  264. -webkit-user-select: none;
  265. -moz-user-select: none;
  266. -ms-user-select: none;
  267. user-select: none;
  268. }
  269. .line-numbers span {
  270. cursor: pointer;
  271. }
  272. .docblock-short p {
  273. display: inline;
  274. }
  275. .docblock-short.nowrap {
  276. display: block;
  277. overflow: hidden;
  278. white-space: nowrap;
  279. text-overflow: ellipsis;
  280. }
  281. .docblock-short p {
  282. overflow: hidden;
  283. text-overflow: ellipsis;
  284. margin: 0;
  285. }
  286. .docblock-short code {
  287. white-space: nowrap;
  288. }
  289. .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
  290. border-bottom: 1px solid;
  291. }
  292. #main > .docblock h1 { font-size: 1.3em; }
  293. #main > .docblock h2 { font-size: 1.15em; }
  294. #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
  295. .docblock h1 { font-size: 1em; }
  296. .docblock h2 { font-size: 0.95em; }
  297. .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
  298. .docblock {
  299. margin-left: 24px;
  300. position: relative;
  301. }
  302. .content .out-of-band {
  303. font-size: 23px;
  304. margin: 0px;
  305. padding: 0px;
  306. text-align: right;
  307. display: inline-block;
  308. font-weight: normal;
  309. position: absolute;
  310. right: 0;
  311. }
  312. h3.impl > .out-of-band {
  313. font-size: 21px;
  314. }
  315. h4.method > .out-of-band {
  316. font-size: 19px;
  317. }
  318. ul.item-list > li > .out-of-band {
  319. font-size: 19px;
  320. }
  321. h4 > code, h3 > code, .invisible > code {
  322. max-width: calc(100% - 41px);
  323. display: block;
  324. }
  325. .in-band, code {
  326. z-index: 5;
  327. }
  328. .invisible {
  329. width: 100%;
  330. display: inline-block;
  331. }
  332. .content .in-band {
  333. margin: 0px;
  334. padding: 0px;
  335. display: inline-block;
  336. max-width: calc(100% - 43px);
  337. }
  338. .in-band > code {
  339. display: inline-block;
  340. }
  341. #main {
  342. position: relative;
  343. }
  344. #main > .since {
  345. top: inherit;
  346. font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  347. }
  348. .content table {
  349. border-spacing: 0 5px;
  350. border-collapse: separate;
  351. }
  352. .content td { vertical-align: top; }
  353. .content td:first-child { padding-right: 20px; }
  354. .content td p:first-child { margin-top: 0; }
  355. .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
  356. .docblock table {
  357. border: 1px solid;
  358. margin: .5em 0;
  359. border-collapse: collapse;
  360. width: 100%;
  361. }
  362. .docblock table td {
  363. padding: .5em;
  364. border-top: 1px dashed;
  365. border-bottom: 1px dashed;
  366. }
  367. .docblock table th {
  368. padding: .5em;
  369. text-align: left;
  370. border-top: 1px solid;
  371. border-bottom: 1px solid;
  372. }
  373. .fields + table {
  374. margin-bottom: 1em;
  375. }
  376. .content .item-list {
  377. list-style-type: none;
  378. padding: 0;
  379. }
  380. .content .item-list li {
  381. margin-bottom: 1em;
  382. }
  383. .content .multi-column {
  384. -moz-column-count: 5;
  385. -moz-column-gap: 2.5em;
  386. -webkit-column-count: 5;
  387. -webkit-column-gap: 2.5em;
  388. column-count: 5;
  389. column-gap: 2.5em;
  390. }
  391. .content .multi-column li { width: 100%; display: inline-block; }
  392. .content .method {
  393. font-size: 1em;
  394. position: relative;
  395. }
  396. /* Shift "where ..." part of method or fn definition down a line */
  397. .content .method .where,
  398. .content .fn .where,
  399. .content .where.fmt-newline {
  400. display: block;
  401. font-size: 0.8em;
  402. }
  403. .content .methods > div:not(.important-traits) { margin-left: 40px; }
  404. .content .impl-items .docblock, .content .impl-items .stability {
  405. margin-left: 40px;
  406. margin-bottom: .6em;
  407. }
  408. .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
  409. margin-left: 20px;
  410. }
  411. .content .stability code {
  412. font-size: 90%;
  413. }
  414. nav {
  415. border-bottom: 1px solid;
  416. padding-bottom: 10px;
  417. margin-bottom: 10px;
  418. }
  419. nav.main {
  420. padding: 20px 0;
  421. text-align: center;
  422. }
  423. nav.main .current {
  424. border-top: 1px solid;
  425. border-bottom: 1px solid;
  426. }
  427. nav.main .separator {
  428. border: 1px solid;
  429. display: inline-block;
  430. height: 23px;
  431. margin: 0 20px;
  432. }
  433. nav.sum { text-align: right; }
  434. nav.sub form { display: inline; }
  435. nav.sub, .content {
  436. margin-left: 230px;
  437. }
  438. a {
  439. text-decoration: none;
  440. background: transparent;
  441. }
  442. .small-section-header:hover > .anchor {
  443. display: initial;
  444. }
  445. .in-band:hover > .anchor {
  446. display: inline-block;
  447. position: absolute;
  448. }
  449. .anchor {
  450. display: none;
  451. position: absolute;
  452. left: -25px;
  453. }
  454. .anchor.field {
  455. left: -20px;
  456. }
  457. .anchor:before {
  458. content: '\2002\00a7\2002';
  459. }
  460. .docblock a:hover, .docblock-short a:hover, .stability a {
  461. text-decoration: underline;
  462. }
  463. .block a.current.crate { font-weight: 500; }
  464. .search-input {
  465. width: 100%;
  466. /* Override Normalize.css: we have margins and do
  467. not want to overflow - the `moz` attribute is necessary
  468. until Firefox 29, too early to drop at this point */
  469. -moz-box-sizing: border-box !important;
  470. box-sizing: border-box !important;
  471. outline: none;
  472. border: none;
  473. border-radius: 1px;
  474. margin-top: 5px;
  475. padding: 10px 16px;
  476. font-size: 17px;
  477. transition: border-color 300ms ease;
  478. transition: border-radius 300ms ease-in-out;
  479. transition: box-shadow 300ms ease-in-out;
  480. }
  481. .search-input:focus {
  482. border-radius: 2px;
  483. border: 0;
  484. outline: 0;
  485. box-shadow: 0 0 8px #078dd8;
  486. }
  487. .search-results .desc {
  488. white-space: nowrap;
  489. text-overflow: ellipsis;
  490. overflow: hidden;
  491. display: block;
  492. }
  493. .search-results a {
  494. display: block;
  495. }
  496. .content .search-results td:first-child { padding-right: 0; }
  497. .content .search-results td:first-child a { padding-right: 10px; }
  498. tr.result span.primitive::after {
  499. content: ' (primitive type)';
  500. font-style: italic;
  501. }
  502. body.blur > :not(#help) {
  503. filter: blur(8px);
  504. -webkit-filter: blur(8px);
  505. opacity: .7;
  506. }
  507. #help {
  508. width: 100%;
  509. height: 100vh;
  510. position: fixed;
  511. top: 0;
  512. left: 0;
  513. display: flex;
  514. justify-content: center;
  515. align-items: center;
  516. }
  517. #help > div {
  518. flex: 0 0 auto;
  519. box-shadow: 0 0 6px rgba(0,0,0,.2);
  520. width: 550px;
  521. height: auto;
  522. border: 1px solid;
  523. }
  524. #help dt {
  525. float: left;
  526. clear: left;
  527. display: block;
  528. }
  529. #help dd { margin: 5px 35px; }
  530. #help .infos { padding-left: 0; }
  531. #help h1, #help h2 { margin-top: 0; }
  532. #help > div div {
  533. width: 50%;
  534. float: left;
  535. padding: 20px;
  536. padding-left: 17px;
  537. }
  538. .stab {
  539. display: table;
  540. border-width: 1px;
  541. border-style: solid;
  542. padding: 3px;
  543. margin-bottom: 5px;
  544. font-size: 90%;
  545. }
  546. .stab p {
  547. display: inline;
  548. }
  549. .stab summary {
  550. display: list-item;
  551. }
  552. .stab .microscope {
  553. font-size: 1.5em;
  554. }
  555. .module-item .stab {
  556. display: inline;
  557. border-width: 0;
  558. padding: 0;
  559. margin: 0;
  560. background: inherit !important;
  561. }
  562. .module-item.unstable {
  563. opacity: 0.65;
  564. }
  565. .since {
  566. font-weight: normal;
  567. font-size: initial;
  568. position: absolute;
  569. right: 0;
  570. top: 0;
  571. }
  572. .variants_table {
  573. width: 100%;
  574. }
  575. .variants_table tbody tr td:first-child {
  576. width: 1%; /* make the variant name as small as possible */
  577. }
  578. td.summary-column {
  579. width: 100%;
  580. }
  581. .summary {
  582. padding-right: 0px;
  583. }
  584. pre.rust .question-mark {
  585. font-weight: bold;
  586. }
  587. a.test-arrow {
  588. display: inline-block;
  589. position: absolute;
  590. padding: 5px 10px 5px 10px;
  591. border-radius: 5px;
  592. font-size: 130%;
  593. top: 5px;
  594. right: 5px;
  595. }
  596. a.test-arrow:hover{
  597. text-decoration: none;
  598. }
  599. .section-header:hover a:before {
  600. position: absolute;
  601. left: -25px;
  602. content: '\2002\00a7\2002';
  603. }
  604. .section-header:hover a {
  605. text-decoration: none;
  606. }
  607. .section-header a {
  608. color: inherit;
  609. }
  610. .collapse-toggle {
  611. font-weight: 300;
  612. position: absolute;
  613. left: -23px;
  614. top: 0;
  615. }
  616. h3 > .collapse-toggle, h4 > .collapse-toggle {
  617. font-size: 0.8em;
  618. top: 5px;
  619. }
  620. .toggle-wrapper > .collapse-toggle {
  621. left: -24px;
  622. margin-top: 0px;
  623. }
  624. .toggle-wrapper {
  625. position: relative;
  626. margin-top: 5px;
  627. }
  628. .toggle-wrapper.collapsed {
  629. height: 25px;
  630. transition: height .2s;
  631. margin-bottom: .6em;
  632. }
  633. .collapse-toggle > .inner {
  634. display: inline-block;
  635. width: 1.2ch;
  636. text-align: center;
  637. }
  638. .ghost {
  639. display: none;
  640. }
  641. .ghost + .since {
  642. position: initial;
  643. display: table-cell;
  644. }
  645. .since + .srclink {
  646. display: table-cell;
  647. padding-left: 10px;
  648. }
  649. .item-spacer {
  650. width: 100%;
  651. height: 12px;
  652. }
  653. span.since {
  654. position: initial;
  655. font-size: 20px;
  656. margin-right: 5px;
  657. }
  658. .toggle-wrapper > .collapse-toggle {
  659. left: 0;
  660. }
  661. .variant + .toggle-wrapper + .docblock > p {
  662. margin-top: 5px;
  663. }
  664. .sub-variant, .sub-variant > h3 {
  665. margin-top: 0 !important;
  666. }
  667. .toggle-label {
  668. display: inline-block;
  669. margin-left: 4px;
  670. margin-top: 3px;
  671. }
  672. .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
  673. margin-left: 30px;
  674. margin-bottom: 20px;
  675. margin-top: 5px;
  676. }
  677. .docblock > .section-header:first-child {
  678. margin-left: 15px;
  679. margin-top: 0;
  680. }
  681. .docblock > .section-header:first-child:hover > a:before {
  682. left: -10px;
  683. }
  684. .enum > .collapsed, .struct > .collapsed {
  685. margin-bottom: 25px;
  686. }
  687. #main > .variant, #main > .structfield {
  688. display: block;
  689. }
  690. .attributes {
  691. display: block;
  692. margin: 0px 0px 0px 30px !important;
  693. }
  694. .toggle-attributes.collapsed {
  695. margin-bottom: 5px;
  696. }
  697. :target > code {
  698. opacity: 1;
  699. }
  700. /* Media Queries */
  701. @media (max-width: 700px) {
  702. body {
  703. padding-top: 0px;
  704. }
  705. .sidebar {
  706. height: 45px;
  707. min-height: 40px;
  708. width: calc(100% + 30px);
  709. margin: 0;
  710. margin-left: -15px;
  711. padding: 0 15px;
  712. position: static;
  713. z-index: 1;
  714. }
  715. .sidebar > .location {
  716. float: right;
  717. margin: 0px;
  718. margin-top: 2px;
  719. padding: 3px 10px 1px 10px;
  720. min-height: 39px;
  721. background: inherit;
  722. text-align: left;
  723. font-size: 24px;
  724. }
  725. .sidebar .location:empty {
  726. padding: 0;
  727. }
  728. .sidebar img {
  729. width: 35px;
  730. margin-top: 5px;
  731. margin-bottom: 5px;
  732. float: left;
  733. margin-left: 50px;
  734. }
  735. .sidebar-menu {
  736. position: fixed;
  737. z-index: 10;
  738. font-size: 2rem;
  739. cursor: pointer;
  740. width: 45px;
  741. left: 0;
  742. text-align: center;
  743. display: block;
  744. border-bottom: 1px solid;
  745. border-right: 1px solid;
  746. height: 45px;
  747. }
  748. .sidebar-elems {
  749. position: fixed;
  750. z-index: 1;
  751. left: 0;
  752. top: 45px;
  753. bottom: 0;
  754. overflow-y: auto;
  755. border-right: 1px solid;
  756. display: none;
  757. }
  758. .sidebar > .block.version {
  759. border-bottom: none;
  760. margin-top: 12px;
  761. }
  762. nav.sub {
  763. width: calc(100% - 32px);
  764. float: right;
  765. }
  766. .content {
  767. margin-left: 0px;
  768. }
  769. #main {
  770. margin-top: 45px;
  771. padding: 0;
  772. }
  773. .content .in-band {
  774. width: 100%;
  775. }
  776. .content h4 > .out-of-band {
  777. position: inherit;
  778. }
  779. .toggle-wrapper > .collapse-toggle {
  780. left: 0px;
  781. }
  782. .toggle-wrapper {
  783. height: 1.5em;
  784. }
  785. #search {
  786. margin-left: 0;
  787. }
  788. .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
  789. display: flex;
  790. }
  791. }
  792. @media print {
  793. nav.sub, .content .out-of-band, .collapse-toggle {
  794. display: none;
  795. }
  796. }
  797. .information {
  798. position: absolute;
  799. left: -20px;
  800. margin-top: 7px;
  801. z-index: 1;
  802. }
  803. .tooltip {
  804. position: relative;
  805. display: inline-block;
  806. cursor: pointer;
  807. }
  808. .tooltip .tooltiptext {
  809. width: 120px;
  810. display: none;
  811. text-align: center;
  812. padding: 5px 3px;
  813. border-radius: 6px;
  814. margin-left: 5px;
  815. top: -5px;
  816. left: 105%;
  817. z-index: 1;
  818. }
  819. .tooltip:hover .tooltiptext {
  820. display: inline;
  821. }
  822. .tooltip .tooltiptext::after {
  823. content: " ";
  824. position: absolute;
  825. top: 50%;
  826. left: 11px;
  827. margin-top: -5px;
  828. border-width: 5px;
  829. border-style: solid;
  830. }
  831. .important-traits .tooltip .tooltiptext {
  832. border: 1px solid;
  833. }
  834. pre.rust {
  835. position: relative;
  836. }
  837. .search-failed {
  838. text-align: center;
  839. margin-top: 20px;
  840. }
  841. #titles {
  842. height: 35px;
  843. }
  844. #titles > div {
  845. float: left;
  846. width: 33.3%;
  847. text-align: center;
  848. border-bottom: 1px solid;
  849. font-size: 18px;
  850. cursor: pointer;
  851. }
  852. #titles > div.selected {
  853. border-bottom: 3px solid;
  854. }
  855. #titles > div:hover {
  856. border-bottom: 3px solid;
  857. }
  858. #titles > div > div.count {
  859. display: inline-block;
  860. font-size: 16px;
  861. }
  862. .important-traits {
  863. cursor: pointer;
  864. z-index: 2;
  865. }
  866. h4 > .important-traits {
  867. position: absolute;
  868. left: -44px;
  869. top: 2px;
  870. }
  871. @media (max-width: 700px) {
  872. h4 > .important-traits {
  873. position: absolute;
  874. left: -22px;
  875. top: 24px;
  876. }
  877. #titles > div > div.count {
  878. float: left;
  879. width: 100%;
  880. }
  881. #titles {
  882. height: 50px;
  883. }
  884. .sidebar.mobile {
  885. position: fixed;
  886. width: 100%;
  887. margin-left: 0;
  888. background-color: rgba(0,0,0,0);
  889. height: 100%;
  890. }
  891. .show-it {
  892. display: block;
  893. width: 246px;
  894. }
  895. .show-it > .block.items {
  896. margin: 8px 0;
  897. }
  898. .show-it > .block.items > ul {
  899. margin: 0;
  900. }
  901. .show-it > .block.items > ul > li {
  902. text-align: center;
  903. margin: 2px 0;
  904. }
  905. .show-it > .block.items > ul > li > a {
  906. font-size: 21px;
  907. }
  908. /* Because of ios, we need to actually have a full height sidebar title so the
  909. * actual sidebar can show up. But then we need to make it transparent so we don't
  910. * hide content. The filler just allows to create the background for the sidebar
  911. * title. But because of the absolute position, I had to lower the z-index.
  912. */
  913. #sidebar-filler {
  914. position: fixed;
  915. left: 45px;
  916. width: calc(100% - 45px);
  917. top: 0;
  918. height: 45px;
  919. z-index: -1;
  920. border-bottom: 1px solid;
  921. }
  922. }
  923. @media (max-width: 416px) {
  924. #titles {
  925. height: 73px;
  926. }
  927. #titles > div {
  928. height: 73px;
  929. }
  930. }
  931. .modal {
  932. position: fixed;
  933. width: 100vw;
  934. height: 100vh;
  935. z-index: 10000;
  936. top: 0;
  937. left: 0;
  938. }
  939. .modal-content {
  940. display: block;
  941. max-width: 60%;
  942. min-width: 200px;
  943. padding: 8px;
  944. top: 40%;
  945. position: absolute;
  946. left: 50%;
  947. transform: translate(-50%, -40%);
  948. border: 1px solid;
  949. border-radius: 4px;
  950. border-top-right-radius: 0;
  951. }
  952. .modal-content > .docblock {
  953. margin: 0;
  954. }
  955. h3.important {
  956. margin: 0;
  957. margin-bottom: 13px;
  958. font-size: 19px;
  959. }
  960. .modal-content > .docblock > code.content {
  961. margin: 0;
  962. padding: 0;
  963. font-size: 20px;
  964. }
  965. .modal-content > .close {
  966. position: absolute;
  967. font-weight: 900;
  968. right: -25px;
  969. top: -1px;
  970. font-size: 18px;
  971. width: 25px;
  972. padding-right: 2px;
  973. border-top-right-radius: 5px;
  974. border-bottom-right-radius: 5px;
  975. text-align: center;
  976. border: 1px solid;
  977. border-right: 0;
  978. cursor: pointer;
  979. }
  980. .modal-content > .whiter {
  981. height: 25px;
  982. position: absolute;
  983. width: 3px;
  984. right: -2px;
  985. top: 0px;
  986. }
  987. #main > div.important-traits {
  988. position: absolute;
  989. left: -24px;
  990. margin-top: 16px;
  991. }
  992. .content > .methods > div.important-traits {
  993. position: absolute;
  994. left: -42px;
  995. margin-top: 2px;
  996. }
  997. kbd {
  998. display: inline-block;
  999. padding: 3px 5px;
  1000. font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  1001. line-height: 10px;
  1002. vertical-align: middle;
  1003. border: solid 1px;
  1004. border-radius: 3px;
  1005. box-shadow: inset 0 -1px 0;
  1006. cursor: default;
  1007. }
  1008. .theme-picker {
  1009. position: absolute;
  1010. left: 211px;
  1011. top: 19px;
  1012. }
  1013. #theme-picker {
  1014. padding: 4px;
  1015. width: 27px;
  1016. height: 29px;
  1017. border: 1px solid;
  1018. border-radius: 3px;
  1019. cursor: pointer;
  1020. }
  1021. #theme-choices {
  1022. display: none;
  1023. position: absolute;
  1024. left: 0;
  1025. top: 28px;
  1026. border: 1px solid;
  1027. border-radius: 3px;
  1028. z-index: 1;
  1029. cursor: pointer;
  1030. }
  1031. #theme-choices > button {
  1032. border: none;
  1033. width: 100%;
  1034. padding: 4px;
  1035. text-align: center;
  1036. background: rgba(0,0,0,0);
  1037. }
  1038. #theme-choices > button:not(:first-child) {
  1039. border-top: 1px solid;
  1040. }
  1041. @media (max-width: 700px) {
  1042. .theme-picker {
  1043. left: 10px;
  1044. top: 54px;
  1045. z-index: 1;
  1046. }
  1047. }