Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rustdoc.css 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  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), 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, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
  107. font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  108. }
  109. ol, ul {
  110. padding-left: 25px;
  111. }
  112. ul ul, ol ul, ul ol, ol ol {
  113. margin-bottom: 0;
  114. }
  115. p {
  116. margin: 0 0 .6em 0;
  117. }
  118. summary {
  119. outline: none;
  120. }
  121. code, pre {
  122. font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
  123. white-space: pre-wrap;
  124. }
  125. .docblock code, .docblock-short code {
  126. border-radius: 3px;
  127. padding: 0 0.2em;
  128. }
  129. .docblock pre code, .docblock-short pre code {
  130. padding: 0;
  131. }
  132. pre {
  133. padding: 14px;
  134. }
  135. .source .content pre {
  136. padding: 20px;
  137. }
  138. img {
  139. max-width: 100%;
  140. }
  141. .source .content {
  142. margin-top: 50px;
  143. max-width: none;
  144. overflow: visible;
  145. margin-left: 0px;
  146. min-width: 70em;
  147. }
  148. nav.sub {
  149. font-size: 16px;
  150. text-transform: uppercase;
  151. }
  152. .sidebar {
  153. width: 200px;
  154. position: absolute;
  155. left: 0;
  156. top: 0;
  157. min-height: 100%;
  158. }
  159. .sidebar .current {
  160. margin-right: -20px;
  161. }
  162. .content, nav { max-width: 960px; }
  163. /* Everything else */
  164. .js-only, .hidden { display: none !important; }
  165. .sidebar {
  166. padding: 10px;
  167. }
  168. .sidebar img {
  169. margin: 20px auto;
  170. display: block;
  171. }
  172. .sidebar .location {
  173. border: 1px solid;
  174. font-size: 17px;
  175. margin: 30px 0 20px 0;
  176. text-align: center;
  177. word-wrap: break-word;
  178. }
  179. .location:empty {
  180. border: none;
  181. }
  182. .location a:first-child { font-weight: 500; }
  183. .block {
  184. padding: 0 10px;
  185. margin-bottom: 14px;
  186. }
  187. .block h2, .block h3 {
  188. margin-top: 0;
  189. margin-bottom: 8px;
  190. text-align: center;
  191. }
  192. .block ul, .block li {
  193. margin: 0;
  194. padding: 0;
  195. list-style: none;
  196. }
  197. .block a {
  198. display: block;
  199. text-overflow: ellipsis;
  200. overflow: hidden;
  201. line-height: 15px;
  202. padding: 7px 5px;
  203. font-size: 14px;
  204. font-weight: 300;
  205. transition: border 500ms ease-out;
  206. }
  207. .content {
  208. padding: 15px 0;
  209. }
  210. .source .content pre.rust {
  211. white-space: pre;
  212. overflow: auto;
  213. padding-left: 0;
  214. }
  215. #search {
  216. margin-left: 230px;
  217. }
  218. .content pre.line-numbers {
  219. float: left;
  220. border: none;
  221. position: relative;
  222. -webkit-user-select: none;
  223. -moz-user-select: none;
  224. -ms-user-select: none;
  225. user-select: none;
  226. }
  227. .line-numbers span { cursor: pointer; }
  228. .docblock-short p {
  229. display: inline;
  230. }
  231. .docblock-short.nowrap {
  232. display: block;
  233. overflow: hidden;
  234. white-space: nowrap;
  235. text-overflow: ellipsis;
  236. }
  237. .docblock-short p {
  238. overflow: hidden;
  239. text-overflow: ellipsis;
  240. margin: 0;
  241. }
  242. .docblock-short code { white-space: nowrap; }
  243. .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
  244. border-bottom: 1px solid;
  245. }
  246. #main > .docblock h1 { font-size: 1.3em; }
  247. #main > .docblock h2 { font-size: 1.15em; }
  248. #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
  249. .docblock h1 { font-size: 1em; }
  250. .docblock h2 { font-size: 0.95em; }
  251. .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
  252. .docblock {
  253. margin-left: 24px;
  254. }
  255. .content .out-of-band {
  256. font-size: 23px;
  257. margin: 0px;
  258. padding: 0px;
  259. text-align: right;
  260. display: inline-block;
  261. font-weight: normal;
  262. position: absolute;
  263. right: 0;
  264. }
  265. h3.impl > .out-of-band {
  266. font-size: 21px;
  267. }
  268. h4.method > .out-of-band {
  269. font-size: 19px;
  270. }
  271. h4 > code, h3 > code, .invisible > code {
  272. position: inherit;
  273. }
  274. .in-band, code {
  275. z-index: 5;
  276. }
  277. .invisible {
  278. background: rgba(0, 0, 0, 0);
  279. width: 100%;
  280. display: inline-block;
  281. }
  282. .content .in-band {
  283. margin: 0px;
  284. padding: 0px;
  285. display: inline-block;
  286. }
  287. #main { position: relative; }
  288. #main > .since {
  289. top: inherit;
  290. font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  291. }
  292. .content table {
  293. border-spacing: 0 5px;
  294. border-collapse: separate;
  295. }
  296. .content td { vertical-align: top; }
  297. .content td:first-child { padding-right: 20px; }
  298. .content td p:first-child { margin-top: 0; }
  299. .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
  300. .docblock table {
  301. border: 1px solid;
  302. margin: .5em 0;
  303. border-collapse: collapse;
  304. width: 100%;
  305. }
  306. .docblock table td {
  307. padding: .5em;
  308. border-top: 1px dashed;
  309. border-bottom: 1px dashed;
  310. }
  311. .docblock table th {
  312. padding: .5em;
  313. text-align: left;
  314. border-top: 1px solid;
  315. border-bottom: 1px solid;
  316. }
  317. .fields + table {
  318. margin-bottom: 1em;
  319. }
  320. .content .item-list {
  321. list-style-type: none;
  322. padding: 0;
  323. }
  324. .content .item-list li { margin-bottom: 3px; }
  325. .content .multi-column {
  326. -moz-column-count: 5;
  327. -moz-column-gap: 2.5em;
  328. -webkit-column-count: 5;
  329. -webkit-column-gap: 2.5em;
  330. column-count: 5;
  331. column-gap: 2.5em;
  332. }
  333. .content .multi-column li { width: 100%; display: inline-block; }
  334. .content .method {
  335. font-size: 1em;
  336. position: relative;
  337. }
  338. /* Shift "where ..." part of method or fn definition down a line */
  339. .content .method .where,
  340. .content .fn .where,
  341. .content .where.fmt-newline {
  342. display: block;
  343. color: #4E4C4C;
  344. font-size: 0.8em;
  345. }
  346. .content .methods > div { margin-left: 40px; }
  347. .content .impl-items .docblock, .content .impl-items .stability {
  348. margin-left: 40px;
  349. }
  350. .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
  351. margin-left: 20px;
  352. }
  353. .content .stability code {
  354. font-size: 90%;
  355. }
  356. nav {
  357. border-bottom: 1px solid;
  358. padding-bottom: 10px;
  359. margin-bottom: 10px;
  360. }
  361. nav.main {
  362. padding: 20px 0;
  363. text-align: center;
  364. }
  365. nav.main .current {
  366. border-top: 1px solid;
  367. border-bottom: 1px solid;
  368. }
  369. nav.main .separator {
  370. border: 1px solid;
  371. display: inline-block;
  372. height: 23px;
  373. margin: 0 20px;
  374. }
  375. nav.sum { text-align: right; }
  376. nav.sub form { display: inline; }
  377. nav.sub, .content {
  378. margin-left: 230px;
  379. }
  380. a {
  381. text-decoration: none;
  382. background: transparent;
  383. }
  384. .small-section-header:hover > .anchor {
  385. display: initial;
  386. }
  387. .in-band:hover > .anchor {
  388. display: initial;
  389. }
  390. .anchor {
  391. display: none;
  392. }
  393. .anchor:after {
  394. content: '\2002\00a7\2002';
  395. }
  396. .docblock a:hover, .docblock-short a:hover, .stability a {
  397. text-decoration: underline;
  398. }
  399. .block a.current.crate { font-weight: 500; }
  400. .search-input {
  401. width: 100%;
  402. /* Override Normalize.css: we have margins and do
  403. not want to overflow - the `moz` attribute is necessary
  404. until Firefox 29, too early to drop at this point */
  405. -moz-box-sizing: border-box !important;
  406. box-sizing: border-box !important;
  407. outline: none;
  408. border: none;
  409. border-radius: 1px;
  410. margin-top: 5px;
  411. padding: 10px 16px;
  412. font-size: 17px;
  413. transition: border-color 300ms ease;
  414. transition: border-radius 300ms ease-in-out;
  415. transition: box-shadow 300ms ease-in-out;
  416. }
  417. .search-input:focus {
  418. border-color: #66afe9;
  419. border-radius: 2px;
  420. border: 0;
  421. outline: 0;
  422. box-shadow: 0 0 8px #078dd8;
  423. }
  424. .search-results .desc {
  425. white-space: nowrap;
  426. text-overflow: ellipsis;
  427. overflow: hidden;
  428. display: block;
  429. }
  430. .search-results a {
  431. display: block;
  432. }
  433. .content .search-results td:first-child { padding-right: 0; }
  434. .content .search-results td:first-child a { padding-right: 10px; }
  435. tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black;
  436. }
  437. body.blur > :not(#help) {
  438. filter: blur(8px);
  439. -webkit-filter: blur(8px);
  440. opacity: .7;
  441. }
  442. #help {
  443. width: 100%;
  444. height: 100vh;
  445. position: fixed;
  446. top: 0;
  447. left: 0;
  448. display: flex;
  449. justify-content: center;
  450. align-items: center;
  451. }
  452. #help > div {
  453. flex: 0 0 auto;
  454. box-shadow: 0 0 6px rgba(0,0,0,.2);
  455. width: 550px;
  456. height: 330px;
  457. border: 1px solid;
  458. }
  459. #help dt {
  460. float: left;
  461. border-radius: 4px;
  462. border: 1px solid;
  463. width: 23px;
  464. text-align: center;
  465. clear: left;
  466. display: block;
  467. margin-top: -1px;
  468. }
  469. #help dd { margin: 5px 33px; }
  470. #help .infos { padding-left: 0; }
  471. #help h1, #help h2 { margin-top: 0; }
  472. #help > div div {
  473. width: 50%;
  474. float: left;
  475. padding: 20px;
  476. }
  477. .stab {
  478. display: table;
  479. border-width: 1px;
  480. border-style: solid;
  481. padding: 3px;
  482. margin-bottom: 5px;
  483. font-size: 90%;
  484. }
  485. .stab p {
  486. display: inline;
  487. }
  488. .stab summary {
  489. display: list-item;
  490. }
  491. .stab .microscope {
  492. font-size: 1.5em;
  493. }
  494. .module-item .stab {
  495. display: inline;
  496. border-width: 0;
  497. padding: 0;
  498. margin: 0;
  499. background: inherit !important;
  500. }
  501. .module-item.unstable {
  502. opacity: 0.65;
  503. }
  504. .since {
  505. font-weight: normal;
  506. font-size: initial;
  507. position: absolute;
  508. right: 0;
  509. top: 0;
  510. }
  511. .variants_table {
  512. width: 100%;
  513. }
  514. .variants_table tbody tr td:first-child {
  515. width: 1%; /* make the variant name as small as possible */
  516. }
  517. td.summary-column {
  518. width: 100%;
  519. }
  520. .summary {
  521. padding-right: 0px;
  522. }
  523. pre.rust .question-mark {
  524. font-weight: bold;
  525. }
  526. pre.rust { position: relative; }
  527. a.test-arrow {
  528. display: inline-block;
  529. position: absolute;
  530. padding: 5px 10px 5px 10px;
  531. border-radius: 5px;
  532. font-size: 130%;
  533. top: 5px;
  534. right: 5px;
  535. }
  536. a.test-arrow:hover{
  537. text-decoration: none;
  538. }
  539. .section-header:hover a:after {
  540. content: '\2002\00a7\2002';
  541. }
  542. .section-header:hover a {
  543. text-decoration: none;
  544. }
  545. .section-header a {
  546. color: inherit;
  547. }
  548. .collapse-toggle {
  549. font-weight: 300;
  550. position: absolute;
  551. left: -23px;
  552. color: #999;
  553. top: 0;
  554. }
  555. h3 > .collapse-toggle, h4 > .collapse-toggle {
  556. font-size: 0.8em;
  557. top: 5px;
  558. }
  559. .toggle-wrapper > .collapse-toggle {
  560. left: -24px;
  561. margin-top: 0px;
  562. }
  563. .toggle-wrapper {
  564. position: relative;
  565. }
  566. .toggle-wrapper.collapsed {
  567. height: 1em;
  568. transition: height .2s;
  569. }
  570. .collapse-toggle > .inner {
  571. display: inline-block;
  572. width: 1.2ch;
  573. text-align: center;
  574. }
  575. .ghost {
  576. display: none;
  577. }
  578. .ghost + .since {
  579. position: initial;
  580. display: table-cell;
  581. }
  582. .since + .srclink {
  583. display: table-cell;
  584. padding-left: 10px;
  585. }
  586. .item-spacer {
  587. width: 100%;
  588. height: 12px;
  589. }
  590. span.since {
  591. position: initial;
  592. font-size: 20px;
  593. margin-right: 5px;
  594. }
  595. .toggle-wrapper > .collapse-toggle {
  596. left: 0;
  597. }
  598. .variant + .toggle-wrapper + .docblock > p {
  599. margin-top: 5px;
  600. }
  601. .variant + .toggle-wrapper > a {
  602. margin-top: 5px;
  603. }
  604. .sub-variant, .sub-variant > h3 {
  605. margin-top: 0 !important;
  606. }
  607. .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
  608. margin-left: 30px;
  609. margin-bottom: 20px;
  610. margin-top: 5px;
  611. }
  612. .enum > .collapsed, .struct > .collapsed {
  613. margin-bottom: 25px;
  614. }
  615. #main > .variant, #main > .structfield {
  616. display: block;
  617. }
  618. .attributes {
  619. display: block;
  620. margin: 0px 0px 0px 30px !important;
  621. }
  622. .toggle-attributes.collapsed {
  623. margin-bottom: 5px;
  624. }
  625. :target > code {
  626. opacity: 1;
  627. }
  628. /* Media Queries */
  629. @media (max-width: 700px) {
  630. body {
  631. padding-top: 0px;
  632. }
  633. .sidebar {
  634. height: 40px;
  635. min-height: 40px;
  636. width: 100%;
  637. margin: 0px;
  638. padding: 0px;
  639. position: static;
  640. }
  641. .sidebar .location {
  642. float: right;
  643. margin: 0px;
  644. padding: 3px 10px 1px 10px;
  645. min-height: 39px;
  646. background: inherit;
  647. text-align: left;
  648. font-size: 24px;
  649. }
  650. .sidebar .location:empty {
  651. padding: 0;
  652. }
  653. .sidebar img {
  654. width: 35px;
  655. margin-top: 5px;
  656. margin-bottom: 0px;
  657. float: left;
  658. }
  659. nav.sub {
  660. margin: 0 auto;
  661. }
  662. .sidebar .block {
  663. display: none;
  664. }
  665. .content {
  666. margin-left: 0px;
  667. }
  668. .content .in-band {
  669. width: 100%;
  670. }
  671. .content .out-of-band {
  672. display: none;
  673. }
  674. .toggle-wrapper > .collapse-toggle {
  675. left: 0px;
  676. }
  677. .toggle-wrapper {
  678. height: 1.5em;
  679. }
  680. }
  681. @media print {
  682. nav.sub, .content .out-of-band, .collapse-toggle {
  683. display: none;
  684. }
  685. }