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.

660 lines
14 KiB

  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. @font-face {
  13. font-family: 'Fira Sans';
  14. font-style: normal;
  15. font-weight: 400;
  16. src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
  17. }
  18. @font-face {
  19. font-family: 'Fira Sans';
  20. font-style: normal;
  21. font-weight: 500;
  22. src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
  23. }
  24. @font-face {
  25. font-family: 'Source Serif Pro';
  26. font-style: normal;
  27. font-weight: 400;
  28. src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
  29. }
  30. @font-face {
  31. font-family: 'Source Serif Pro';
  32. font-style: italic;
  33. font-weight: 400;
  34. src: url("Heuristica-Italic.woff") format('woff');
  35. }
  36. @font-face {
  37. font-family: 'Source Serif Pro';
  38. font-style: normal;
  39. font-weight: 700;
  40. src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
  41. }
  42. @font-face {
  43. font-family: 'Source Code Pro';
  44. font-style: normal;
  45. font-weight: 400;
  46. src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
  47. }
  48. @font-face {
  49. font-family: 'Source Code Pro';
  50. font-style: normal;
  51. font-weight: 600;
  52. src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
  53. }
  54. @import "normalize.css";
  55. * {
  56. -webkit-box-sizing: border-box;
  57. -moz-box-sizing: border-box;
  58. box-sizing: border-box;
  59. }
  60. /* General structure and fonts */
  61. body {
  62. color: #333;
  63. font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
  64. margin: 0;
  65. position: relative;
  66. padding: 10px 15px 20px 15px;
  67. -webkit-font-feature-settings: "kern", "liga";
  68. -moz-font-feature-settings: "kern", "liga";
  69. font-feature-settings: "kern", "liga";
  70. }
  71. h1 {
  72. font-size: 1.5em;
  73. }
  74. h2 {
  75. font-size: 1.4em;
  76. }
  77. h3 {
  78. font-size: 1.3em;
  79. }
  80. h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
  81. color: black;
  82. font-weight: 500;
  83. margin: 20px 0 15px 0;
  84. padding-bottom: 6px;
  85. }
  86. h1.fqn {
  87. border-bottom: 1px dashed #D5D5D5;
  88. margin-top: 0;
  89. }
  90. h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
  91. border-bottom: 1px solid #DDDDDD;
  92. }
  93. h3.impl, h3.method, h4.method, h3.type, h4.type {
  94. font-weight: 600;
  95. margin-top: 10px;
  96. margin-bottom: 10px;
  97. }
  98. h3.impl, h3.method, h3.type {
  99. margin-top: 15px;
  100. }
  101. h1, h2, h3, h4, section.sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
  102. font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  103. }
  104. ol, ul {
  105. padding-left: 25px;
  106. }
  107. ul ul, ol ul, ul ol, ol ol {
  108. margin-bottom: 0;
  109. }
  110. p {
  111. margin: 0 0 .6em 0;
  112. }
  113. code, pre {
  114. font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
  115. white-space: pre-wrap;
  116. }
  117. .docblock code {
  118. background-color: #F5F5F5;
  119. border-radius: 3px;
  120. padding: 0 0.2em;
  121. }
  122. pre {
  123. background-color: #F5F5F5;
  124. padding: 14px;
  125. }
  126. .source pre {
  127. padding: 20px;
  128. }
  129. .content.source {
  130. margin-top: 50px;
  131. max-width: none;
  132. overflow: visible;
  133. margin-left: 0px;
  134. min-width: 70em;
  135. }
  136. nav.sub {
  137. font-size: 16px;
  138. text-transform: uppercase;
  139. }
  140. .sidebar {
  141. width: 200px;
  142. position: absolute;
  143. left: 0;
  144. top: 0;
  145. min-height: 100%;
  146. }
  147. .content, nav { max-width: 960px; }
  148. /* Everything else */
  149. .js-only, .hidden { display: none; }
  150. .sidebar {
  151. padding: 10px;
  152. }
  153. .sidebar img {
  154. margin: 20px auto;
  155. display: block;
  156. }
  157. .sidebar .location {
  158. font-size: 17px;
  159. margin: 30px 0 20px 0;
  160. background: #e1e1e1;
  161. text-align: center;
  162. color: #333;
  163. }
  164. .location a:first-child { font-weight: 500; }
  165. .block {
  166. padding: 0 10px;
  167. margin-bottom: 14px;
  168. }
  169. .block h2 {
  170. margin-top: 0;
  171. margin-bottom: 8px;
  172. text-align: center;
  173. }
  174. .block a {
  175. display: block;
  176. text-overflow: ellipsis;
  177. overflow: hidden;
  178. line-height: 15px;
  179. padding: 7px 5px;
  180. font-size: 14px;
  181. font-weight: 300;
  182. transition: border 500ms ease-out;
  183. }
  184. .block a:hover {
  185. background: #F5F5F5;
  186. }
  187. .content {
  188. padding: 15px 0;
  189. }
  190. .content.source pre.rust {
  191. white-space: pre;
  192. overflow: auto;
  193. padding-left: 0;
  194. }
  195. .content pre.line-numbers {
  196. float: left;
  197. border: none;
  198. position: relative;
  199. -webkit-user-select: none;
  200. -moz-user-select: none;
  201. -ms-user-select: none;
  202. user-select: none;
  203. }
  204. .line-numbers span { color: #c67e2d; cursor: pointer; }
  205. .line-numbers .line-highlighted {
  206. background-color: #f6fdb0 !important;
  207. }
  208. .content .highlighted {
  209. color: #000 !important;
  210. background-color: #ccc;
  211. }
  212. .content .highlighted a, .content .highlighted span { color: #000 !important; }
  213. .content .highlighted.trait { background-color: #fece7e; }
  214. .content .highlighted.mod { background-color: #afc6e4; }
  215. .content .highlighted.enum { background-color: #b4d1b9; }
  216. .content .highlighted.struct { background-color: #e7b1a0; }
  217. .content .highlighted.fn { background-color: #c6afb3; }
  218. .content .highlighted.method { background-color: #c6afb3; }
  219. .content .highlighted.tymethod { background-color: #c6afb3; }
  220. .content .highlighted.type { background-color: #c6afb3; }
  221. .docblock.short p {
  222. display: inline;
  223. }
  224. .docblock.short.nowrap {
  225. display: block;
  226. overflow: hidden;
  227. white-space: nowrap;
  228. text-overflow: ellipsis;
  229. }
  230. .docblock.short p {
  231. overflow: hidden;
  232. text-overflow: ellipsis;
  233. margin: 0;
  234. }
  235. .docblock.short code { white-space: nowrap; }
  236. .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
  237. border-bottom: 1px solid #DDD;
  238. }
  239. .docblock h1 { font-size: 1.3em; }
  240. .docblock h2 { font-size: 1.15em; }
  241. .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
  242. .content .out-of-band {
  243. font-size: 23px;
  244. width: 40%;
  245. margin: 0px;
  246. padding: 0px;
  247. text-align: right;
  248. display: inline-block;
  249. }
  250. .content .in-band {
  251. width: 60%;
  252. margin: 0px;
  253. padding: 0px;
  254. display: inline-block;
  255. }
  256. .content table {
  257. border-spacing: 0 5px;
  258. border-collapse: separate;
  259. }
  260. .content td { vertical-align: top; }
  261. .content td:first-child { padding-right: 20px; }
  262. .content td p:first-child { margin-top: 0; }
  263. .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
  264. .docblock table {
  265. border: 1px solid #ddd;
  266. margin: .5em 0;
  267. border-collapse: collapse;
  268. width: 100%;
  269. }
  270. .docblock table td {
  271. padding: .5em;
  272. border-top: 1px dashed #ddd;
  273. border-bottom: 1px dashed #ddd;
  274. }
  275. .docblock table th {
  276. padding: .5em;
  277. text-align: left;
  278. border-top: 1px solid #ddd;
  279. border-bottom: 1px solid #ddd;
  280. }
  281. .content .item-list {
  282. list-style-type: none;
  283. padding: 0;
  284. }
  285. .content .item-list li { margin-bottom: 3px; }
  286. .content .multi-column {
  287. -moz-column-count: 5;
  288. -moz-column-gap: 2.5em;
  289. -webkit-column-count: 5;
  290. -webkit-column-gap: 2.5em;
  291. column-count: 5;
  292. column-gap: 2.5em;
  293. }
  294. .content .multi-column li { width: 100%; display: inline-block; }
  295. .content .method {
  296. font-size: 1em;
  297. position: relative;
  298. }
  299. /* Shift "where ..." part of method definition down a line */
  300. .content .method .where { display: block; }
  301. /* Bit of whitespace to indent it */
  302. .content .method .where::before { content: ' '; }
  303. .content .methods > div { margin-left: 40px; }
  304. .content .impl-items .docblock, .content .impl-items .stability {
  305. margin-left: 40px;
  306. }
  307. .content .impl-items .method, .content .impl-items .type {
  308. margin-left: 20px;
  309. }
  310. nav {
  311. border-bottom: 1px solid #e0e0e0;
  312. padding-bottom: 10px;
  313. margin-bottom: 10px;
  314. }
  315. nav.main {
  316. padding: 20px 0;
  317. text-align: center;
  318. }
  319. nav.main .current {
  320. border-top: 1px solid #000;
  321. border-bottom: 1px solid #000;
  322. }
  323. nav.main .separator {
  324. border: 1px solid #000;
  325. display: inline-block;
  326. height: 23px;
  327. margin: 0 20px;
  328. }
  329. nav.sum { text-align: right; }
  330. nav.sub form { display: inline; }
  331. nav, .content {
  332. margin-left: 230px;
  333. }
  334. a {
  335. text-decoration: none;
  336. color: #000;
  337. background: transparent;
  338. }
  339. .docblock a {
  340. color: #4e8bca;
  341. }
  342. .docblock a:hover {
  343. text-decoration: underline;
  344. }
  345. .content span.trait, .content a.trait, .block a.current.trait { color: #8866ff; }
  346. .content span.mod, .content a.mod, block a.current.mod { color: #4d76ae; }
  347. .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
  348. .content span.struct, .content a.struct, .block a.current.struct { color: #e53700; }
  349. .content span.fn, .content a.fn, .block a.current.fn { color: #8c6067; }
  350. .content span.method, .content a.method, .block a.current.method { color: #8c6067; }
  351. .content span.tymethod, .content a.tymethod, .block a.current.tymethod { color: #8c6067; }
  352. .content .fnname { color: #8c6067; }
  353. .search-input {
  354. width: 100%;
  355. /* Override Normalize.css: we have margins and do
  356. not want to overflow - the `moz` attribute is necessary
  357. until Firefox 29, too early to drop at this point */
  358. -moz-box-sizing: border-box !important;
  359. box-sizing: border-box !important;
  360. outline: none;
  361. border: none;
  362. border-radius: 1px;
  363. color: #555;
  364. margin-top: 5px;
  365. padding: 10px 16px;
  366. font-size: 17px;
  367. box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
  368. transition: border-color 300ms ease;
  369. transition: border-radius 300ms ease-in-out;
  370. transition: box-shadow 300ms ease-in-out;
  371. }
  372. .search-input:focus {
  373. border-color: #66afe9;
  374. border-radius: 2px;
  375. border: 0;
  376. outline: 0;
  377. box-shadow: 0 0 8px #078dd8;
  378. }
  379. .search-results .desc {
  380. white-space: nowrap;
  381. text-overflow: ellipsis;
  382. overflow: hidden;
  383. display: block;
  384. }
  385. .search-results a {
  386. display: block;
  387. }
  388. .content .search-results td:first-child { padding-right: 0; }
  389. .content .search-results td:first-child a { padding-right: 10px; }
  390. #help {
  391. background: #e9e9e9;
  392. border-radius: 4px;
  393. box-shadow: 0 0 6px rgba(0,0,0,.2);
  394. position: absolute;
  395. top: 300px;
  396. left: 50%;
  397. margin-top: -125px;
  398. margin-left: -275px;
  399. width: 550px;
  400. height: 300px;
  401. border: 1px solid #bfbfbf;
  402. }
  403. #help dt {
  404. float: left;
  405. border-radius: 3px;
  406. border: 1px solid #bfbfbf;
  407. background: #fff;
  408. width: 23px;
  409. text-align: center;
  410. clear: left;
  411. display: block;
  412. margin-top: -1px;
  413. }
  414. #help dd { margin: 5px 33px; }
  415. #help .infos { padding-left: 0; }
  416. #help h1 { margin-top: 0; }
  417. #help div {
  418. width: 50%;
  419. float: left;
  420. padding: 20px;
  421. }
  422. em.stab.unstable { background: #FFF5D6; border-color: #FFC600; }
  423. em.stab.deprecated { background: #F3DFFF; border-color: #7F0087; }
  424. em.stab {
  425. display: inline-block;
  426. border-width: 1px;
  427. border-style: solid;
  428. padding: 3px;
  429. margin-bottom: 5px;
  430. font-size: 90%;
  431. font-style: normal;
  432. }
  433. em.stab p {
  434. display: inline;
  435. }
  436. .module-item .stab {
  437. border-width: 0;
  438. padding: 0;
  439. margin: 0;
  440. background: inherit !important;
  441. }
  442. .module-item.unstable {
  443. opacity: 0.65;
  444. }
  445. td.summary-column {
  446. width: 100%;
  447. }
  448. .summary {
  449. padding-right: 0px;
  450. }
  451. :target { background: #FDFFD3; }
  452. .line-numbers :target { background-color: transparent; }
  453. /* Code highlighting */
  454. pre.rust .kw { color: #8959A8; }
  455. pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
  456. pre.rust .number, pre.rust .string { color: #718C00; }
  457. pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
  458. pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
  459. pre.rust .comment { color: #8E908C; }
  460. pre.rust .doccomment { color: #4D4D4C; }
  461. pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
  462. pre.rust .lifetime { color: #B76514; }
  463. .rusttest { display: none; }
  464. pre.rust { position: relative; }
  465. .test-arrow {
  466. display: inline-block;
  467. position: absolute;
  468. top: 0;
  469. right: 10px;
  470. font-size: 150%;
  471. -webkit-transform: scaleX(-1);
  472. transform: scaleX(-1);
  473. }
  474. .methods .section-header {
  475. /* Override parent class attributes. */
  476. border-bottom: none !important;
  477. font-size: 1.1em !important;
  478. margin: 0 0 -5px;
  479. padding: 0;
  480. }
  481. .section-header:hover a:after {
  482. content: '\2002\00a7\2002';
  483. }
  484. .section-header:hover a {
  485. text-decoration: none;
  486. }
  487. .section-header a {
  488. color: inherit;
  489. }
  490. .collapse-toggle {
  491. font-weight: 300;
  492. position: absolute;
  493. left: -23px;
  494. color: #999;
  495. top: 0;
  496. }
  497. .toggle-wrapper > .collapse-toggle {
  498. left: -24px;
  499. margin-top: 0px;
  500. }
  501. .toggle-wrapper {
  502. position: relative;
  503. }
  504. .toggle-wrapper.collapsed {
  505. height: 1em;
  506. transition: height .2s;
  507. }
  508. .collapse-toggle > .inner {
  509. display: inline-block;
  510. width: 1.2ch;
  511. text-align: center;
  512. }
  513. .toggle-label {
  514. color: #999;
  515. }
  516. /* Media Queries */
  517. @media (max-width: 700px) {
  518. body {
  519. padding-top: 0px;
  520. }
  521. .sidebar {
  522. height: 40px;
  523. min-height: 40px;
  524. width: 100%;
  525. margin: 0px;
  526. padding: 0px;
  527. position: static;
  528. }
  529. .sidebar .location {
  530. float: left;
  531. margin: 0px;
  532. padding: 5px;
  533. width: 60%;
  534. background: inherit;
  535. text-align: left;
  536. font-size: 24px;
  537. }
  538. .sidebar img {
  539. width: 35px;
  540. margin-top: 5px;
  541. margin-bottom: 0px;
  542. float: left;
  543. }
  544. nav.sub {
  545. margin: 0 auto;
  546. }
  547. .sidebar .block {
  548. display: none;
  549. }
  550. .content {
  551. margin-left: 0px;
  552. }
  553. .content .in-band {
  554. width: 100%;
  555. }
  556. .content .out-of-band {
  557. display: none;
  558. }
  559. .toggle-wrapper > .collapse-toggle {
  560. left: 0px;
  561. }
  562. .toggle-wrapper {
  563. height: 1.5em;
  564. }
  565. }
  566. @media print {
  567. nav.sub, .content .out-of-band, .collapse-toggle {
  568. display: none;
  569. }
  570. }