1/* This is taken from https://github.com/rust-lang/rust/blob/master/src/doc/rust.css */ 2 3@font-face { 4 font-family: 'Fira Sans'; 5 font-style: normal; 6 font-weight: 400; 7 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff'); 8} 9@font-face { 10 font-family: 'Fira Sans'; 11 font-style: normal; 12 font-weight: 500; 13 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff'); 14} 15@font-face { 16 font-family: 'Source Serif Pro'; 17 font-style: normal; 18 font-weight: 400; 19 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff'); 20} 21@font-face { 22 font-family: 'Source Serif Pro'; 23 font-style: italic; 24 font-weight: 400; 25 src: url("SourceSerifPro-It.ttf.woff") format('woff'); 26} 27@font-face { 28 font-family: 'Source Serif Pro'; 29 font-style: normal; 30 font-weight: 700; 31 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff'); 32} 33@font-face { 34 font-family: 'Source Code Pro'; 35 font-style: normal; 36 font-weight: 400; 37 /* Avoid using locally installed font because bad versions are in circulation: 38 * see https://github.com/rust-lang/rust/issues/24355 */ 39 src: url("SourceCodePro-Regular.woff") format('woff'); 40} 41 42*:not(body) { 43 -webkit-box-sizing: border-box; 44 -moz-box-sizing: border-box; 45 box-sizing: border-box; 46} 47 48/* General structure */ 49 50body { 51 background-color: white; 52 margin: 0 auto; 53 padding: 0 15px; 54 font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif; 55 font-size: 18px; 56 color: #333; 57 line-height: 1.428571429; 58 59 -webkit-font-feature-settings: "kern", "liga"; 60 -moz-font-feature-settings: "kern", "liga"; 61 font-feature-settings: "kern", "liga"; 62} 63@media (min-width: 768px) { 64 body { 65 max-width: 750px; 66 } 67} 68 69h1, h2, h3, h4, h5, h6, nav, #versioninfo { 70 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; 71} 72h1, h2, h3, h4, h5, h6 { 73 color: black; 74 font-weight: 400; 75 line-height: 1.1; 76} 77h1, h2, h3 { 78 margin-top: 20px; 79 margin-bottom: 15px; 80} 81h1 { 82 margin-bottom: 20px; 83} 84h4, h5, h6 { 85 margin-top: 12px; 86 margin-bottom: 10px; 87 padding: 5px 10px; 88} 89h5, h6 { 90 text-decoration: underline; 91} 92 93h1 { 94 font-size: 28px; 95 font-weight: 500; 96 padding: .1em .4em; 97 border-bottom: 2px solid #ddd; 98} 99h1.title { 100 line-height: 1.5em; 101} 102h2 { 103 font-size: 26px; 104 padding: .2em .5em; 105 border-bottom: 1px solid #ddd; 106} 107h3 { 108 font-size: 24px; 109 padding: .2em .7em; 110 border-bottom: 1px solid #DDE8FC; 111} 112h4 { 113 font-size: 22px; 114} 115h5 { 116 font-size: 20px; 117} 118h6 { 119 font-size: 18px; 120} 121@media (min-width: 992px) { 122 h1 { 123 font-size: 36px; 124 } 125 h2 { 126 font-size: 30px; 127 } 128 h3 { 129 font-size: 26px; 130 } 131} 132 133nav { 134 column-count: 2; 135 -moz-column-count: 2; 136 -webkit-column-count: 2; 137 font-size: 15px; 138 margin: 0 0 1em 0; 139} 140p { 141 margin: 0 0 1em 0; 142} 143 144strong { 145 font-weight: bold; 146} 147 148em { 149 font-style: italic; 150} 151 152footer { 153 border-top: 1px solid #ddd; 154 font-size: 14px; 155 font-style: italic; 156 padding-top: 5px; 157 margin-top: 3em; 158 margin-bottom: 1em; 159} 160 161/* Links layout */ 162 163a { 164 text-decoration: none; 165 color: #428BCA; 166 background: transparent; 167} 168a:hover, a:focus { 169 color: #2A6496; 170 text-decoration: underline; 171} 172a:focus { 173 outline: thin dotted #333; 174 outline: 5px auto -webkit-focus-ring-color; 175 outline-offset: -2px; 176} 177a:hover, a:active { 178 outline: 0; 179} 180 181h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, 182h3 a:link, h3 a:visited, h4 a:link, h4 a:visited, 183h5 a:link, h5 a:visited {color: black;} 184h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, 185h5 a:hover {text-decoration: none;} 186 187/* Code */ 188 189pre, code { 190 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; 191 word-wrap: break-word; 192} 193pre { 194 border-left: 2px solid #eee; 195 white-space: pre-wrap; 196 padding: 14px; 197 padding-right: 0; 198 margin: 20px 0; 199 font-size: 15px; 200 word-break: break-all; 201} 202code { 203 padding: 0 2px; 204 color: #8D1A38; 205} 206pre code { 207 padding: 0; 208 font-size: inherit; 209 color: inherit; 210} 211 212a > code { 213 color: #428BCA; 214} 215 216.section-header > a > code { 217 color: #8D1A38; 218} 219 220/* Code highlighting */ 221pre.rust .kw { color: #8959A8; } 222pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; } 223pre.rust .number, pre.rust .string { color: #718C00; } 224pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, 225pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; } 226pre.rust .comment { color: #8E908C; } 227pre.rust .doccomment { color: #4D4D4C; } 228pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; } 229pre.rust .lifetime { color: #B76514; } 230 231/* The rest */ 232 233#versioninfo { 234 text-align: center; 235 margin: 0.5em; 236 font-size: 1.1em; 237} 238@media (min-width: 992px) { 239 #versioninfo { 240 font-size: 0.8em; 241 position: fixed; 242 bottom: 0px; 243 right: 0px; 244 } 245 .white-sticker { 246 background-color: #fff; 247 margin: 2px; 248 padding: 0 2px; 249 border-radius: .2em; 250 } 251} 252#versioninfo a.hash { 253 color: gray; 254 font-size: 80%; 255} 256 257blockquote { 258 color: #000; 259 margin: 20px 0; 260 padding: 15px 20px; 261 background-color: #f2f7f9; 262 border-top: .1em solid #e5eef2; 263 border-bottom: .1em solid #e5eef2; 264} 265blockquote p { 266 font-size: 17px; 267 font-weight: 300; 268 line-height: 1.4; 269} 270blockquote p:last-child { 271 margin-bottom: 0; 272} 273 274ul, ol { 275 padding-left: 25px; 276} 277ul ul, ol ul, ul ol, ol ol { 278 margin-bottom: 0; 279} 280dl { 281 margin-bottom: 20px; 282} 283dd { 284 margin-left: 0; 285} 286 287nav ul { 288 list-style-type: none; 289 margin: 0; 290 padding-left: 0px; 291} 292 293/* Only display one level of hierarchy in the TOC */ 294nav ul ul { 295 display: none; 296} 297 298sub, 299sup { 300 font-size: 75%; 301 line-height: 0; 302 position: relative; 303} 304 305hr { 306 margin-top: 20px; 307 margin-bottom: 20px; 308 border: 0; 309 border-top: 1px solid #eeeeee; 310} 311 312table { 313 border-collapse: collapse; 314 border-spacing: 0; 315 overflow-x: auto; 316 display: block; 317} 318 319table tr.odd { 320 background: #eee; 321} 322 323table td, 324table th { 325 border: 1px solid #ddd; 326 padding: 5px; 327} 328 329/* Code snippets */ 330 331pre.rust { position: relative; } 332a.test-arrow { 333 background-color: rgba(78, 139, 202, 0.2); 334 display: inline-block; 335 position: absolute; 336 color: #f5f5f5; 337 padding: 5px 10px 5px 10px; 338 border-radius: 5px; 339 font-size: 130%; 340 top: 5px; 341 right: 5px; 342} 343a.test-arrow:hover{ 344 background-color: #4e8bca; 345 text-decoration: none; 346} 347 348.unstable-feature { 349 border: 2px solid red; 350 padding: 5px; 351} 352 353@media (min-width: 1170px) { 354 pre { 355 font-size: 15px; 356 } 357} 358 359@media print { 360 * { 361 text-shadow: none !important; 362 color: #000 !important; 363 background: transparent !important; 364 box-shadow: none !important; 365 } 366 a, a:visited { 367 text-decoration: underline; 368 } 369 p a[href]:after { 370 content: " (" attr(href) ")"; 371 } 372 footer a[href]:after { 373 content: ""; 374 } 375 a[href^="javascript:"]:after, a[href^="#"]:after { 376 content: ""; 377 } 378 pre, blockquote { 379 border: 1px solid #999; 380 page-break-inside: avoid; 381 } 382 @page { 383 margin: 2cm .5cm; 384 } 385 h1:not(.title), h2, h3 { 386 border-bottom: 0px none; 387 } 388 p, h2, h3 { 389 orphans: 3; 390 widows: 3; 391 } 392 h2, h3 { 393 page-break-after: avoid; 394 } 395 table { 396 border-collapse: collapse !important; 397 } 398 table td, table th { 399 background-color: #fff !important; 400 } 401} 402 403#keyword-table-marker + table thead { display: none; } 404#keyword-table-marker + table td { border: none; } 405#keyword-table-marker + table { 406 margin-left: 2em; 407 margin-bottom: 1em; 408} 409 410.error-described { 411 position: relative; 412} 413 414.information { 415 position: absolute; 416 left: -25px; 417 margin-top: 7px; 418 z-index: 1; 419} 420 421.tooltip { 422 position: relative; 423 display: inline-block; 424 cursor: pointer; 425} 426 427.tooltip .tooltiptext { 428 width: 120px; 429 display: none; 430 text-align: center; 431 padding: 5px 3px; 432 border-radius: 6px; 433 margin-left: 5px; 434 top: -5px; 435 left: 105%; 436 z-index: 1; 437} 438 439.tooltip:hover .tooltiptext { 440 display: inline; 441} 442 443.tooltip .tooltiptext::after { 444 content: " "; 445 position: absolute; 446 top: 50%; 447 left: 13px; 448 margin-top: -5px; 449 border-width: 5px; 450 border-style: solid; 451} 452