2018-07-25 15:28:12 -05:00
|
|
|
/* Base styles and content styles */
|
|
|
|
|
|
2019-10-27 15:51:32 +01:00
|
|
|
:root {
|
|
|
|
|
/* Browser default font-size is 16px, this way 1 rem = 10px */
|
|
|
|
|
font-size: 62.5%;
|
2023-07-18 22:50:45 +02:00
|
|
|
color-scheme: var(--color-scheme);
|
2019-10-27 15:51:32 +01:00
|
|
|
}
|
|
|
|
|
|
2017-10-13 19:09:28 -04:00
|
|
|
html {
|
2018-07-25 14:46:17 -05:00
|
|
|
font-family: "Open Sans", sans-serif;
|
2018-07-25 15:28:12 -05:00
|
|
|
color: var(--fg);
|
|
|
|
|
background-color: var(--bg);
|
2018-07-25 14:46:17 -05:00
|
|
|
text-size-adjust: none;
|
2021-11-13 15:37:15 +09:00
|
|
|
-webkit-text-size-adjust: none;
|
2015-09-18 22:13:55 +02:00
|
|
|
}
|
|
|
|
|
|
2017-06-04 19:58:51 -07:00
|
|
|
body {
|
|
|
|
|
margin: 0;
|
2019-10-27 15:51:32 +01:00
|
|
|
font-size: 1.6rem;
|
2018-01-19 16:41:50 +01:00
|
|
|
overflow-x: hidden;
|
2017-06-04 19:58:51 -07:00
|
|
|
}
|
|
|
|
|
|
2017-04-13 16:46:54 +02:00
|
|
|
code {
|
2022-10-06 16:02:29 -04:00
|
|
|
font-family: var(--mono-font) !important;
|
|
|
|
|
font-size: var(--code-font-size);
|
2022-06-24 15:00:02 +00:00
|
|
|
direction: ltr !important;
|
2017-04-13 16:46:54 +02:00
|
|
|
}
|
|
|
|
|
|
2021-09-08 00:43:52 -07:00
|
|
|
/* make long words/inline code not x overflow */
|
|
|
|
|
main {
|
2022-01-27 18:42:39 -08:00
|
|
|
overflow-wrap: break-word;
|
2021-07-30 00:13:25 -07:00
|
|
|
}
|
|
|
|
|
|
2021-07-30 01:11:36 -07:00
|
|
|
/* make wide tables scroll if they overflow */
|
|
|
|
|
.table-wrapper {
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-24 12:43:20 -07:00
|
|
|
/* Don't change font size in headers. */
|
|
|
|
|
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
|
|
|
|
font-size: unset;
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-25 14:46:17 -05:00
|
|
|
.left { float: left; }
|
|
|
|
|
.right { float: right; }
|
2019-10-16 11:27:14 +02:00
|
|
|
.boring { opacity: 0.6; }
|
|
|
|
|
.hide-boring .boring { display: none; }
|
2020-06-10 12:55:22 -05:00
|
|
|
.hidden { display: none !important; }
|
2017-08-08 00:05:33 +02:00
|
|
|
|
2021-03-15 17:42:44 -06:00
|
|
|
h2, h3 { margin-block-start: 2.5em; }
|
|
|
|
|
h4, h5 { margin-block-start: 2em; }
|
2015-12-30 15:41:49 +01:00
|
|
|
|
2018-07-25 14:46:17 -05:00
|
|
|
.header + .header h3,
|
|
|
|
|
.header + .header h4,
|
2018-12-12 21:43:02 +02:00
|
|
|
.header + .header h5 {
|
2021-03-15 17:42:44 -06:00
|
|
|
margin-block-start: 1em;
|
2018-07-25 14:46:17 -05:00
|
|
|
}
|
2016-01-03 13:47:59 +01:00
|
|
|
|
2021-02-12 16:37:07 -08:00
|
|
|
h1:target::before,
|
|
|
|
|
h2:target::before,
|
|
|
|
|
h3:target::before,
|
|
|
|
|
h4:target::before,
|
|
|
|
|
h5:target::before,
|
|
|
|
|
h6:target::before {
|
2018-03-07 07:02:06 -06:00
|
|
|
display: inline-block;
|
|
|
|
|
content: "»";
|
2021-03-15 17:42:44 -06:00
|
|
|
margin-inline-start: -30px;
|
2018-03-07 07:02:06 -06:00
|
|
|
width: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-12 16:37:07 -08:00
|
|
|
/* This is broken on Safari as of version 14, but is fixed
|
|
|
|
|
in Safari Technology Preview 117 which I think will be Safari 14.2.
|
|
|
|
|
https://bugs.webkit.org/show_bug.cgi?id=218076
|
|
|
|
|
*/
|
|
|
|
|
:target {
|
2021-03-15 17:42:44 -06:00
|
|
|
/* Safari does not support logical properties */
|
2019-10-26 13:21:26 +01:00
|
|
|
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
|
2019-10-26 12:54:41 +01:00
|
|
|
}
|
|
|
|
|
|
2018-07-25 15:28:12 -05:00
|
|
|
.page {
|
|
|
|
|
outline: 0;
|
|
|
|
|
padding: 0 var(--page-padding);
|
2021-03-15 17:42:44 -06:00
|
|
|
margin-block-start: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
|
2018-07-25 15:28:12 -05:00
|
|
|
}
|
|
|
|
|
.page-wrapper {
|
|
|
|
|
box-sizing: border-box;
|
2023-08-24 16:44:25 +08:00
|
|
|
background-color: var(--bg);
|
2018-07-25 15:28:12 -05:00
|
|
|
}
|
2023-08-24 16:44:25 +08:00
|
|
|
.no-js .page-wrapper,
|
2018-12-12 21:43:02 +02:00
|
|
|
.js:not(.sidebar-resizing) .page-wrapper {
|
2018-07-25 15:28:12 -05:00
|
|
|
transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
|
|
|
|
|
}
|
2021-03-16 23:23:13 -06:00
|
|
|
[dir=rtl] .js:not(.sidebar-resizing) .page-wrapper {
|
|
|
|
|
transition: margin-right 0.3s ease, transform 0.3s ease; /* Animation: slide away */
|
|
|
|
|
}
|
2018-07-25 15:28:12 -05:00
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
overflow-y: auto;
|
2022-05-16 18:35:24 -07:00
|
|
|
padding: 0 5px 50px 5px;
|
2018-07-25 15:28:12 -05:00
|
|
|
}
|
|
|
|
|
.content main {
|
2021-03-15 17:42:44 -06:00
|
|
|
margin-inline-start: auto;
|
|
|
|
|
margin-inline-end: auto;
|
2018-07-25 15:28:12 -05:00
|
|
|
max-width: var(--content-max-width);
|
|
|
|
|
}
|
2020-03-06 01:06:19 +01:00
|
|
|
.content p { line-height: 1.45em; }
|
|
|
|
|
.content ol { line-height: 1.45em; }
|
|
|
|
|
.content ul { line-height: 1.45em; }
|
2018-07-25 15:28:12 -05:00
|
|
|
.content a { text-decoration: none; }
|
|
|
|
|
.content a:hover { text-decoration: underline; }
|
2021-05-23 16:10:26 +02:00
|
|
|
.content img, .content video { max-width: 100%; }
|
2018-07-25 15:28:12 -05:00
|
|
|
.content .header:link,
|
|
|
|
|
.content .header:visited {
|
|
|
|
|
color: var(--fg);
|
|
|
|
|
}
|
|
|
|
|
.content .header:link,
|
|
|
|
|
.content .header:visited:hover {
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-03 13:47:59 +01:00
|
|
|
table {
|
|
|
|
|
margin: 0 auto;
|
2016-02-05 18:09:35 +01:00
|
|
|
border-collapse: collapse;
|
2018-07-25 14:46:17 -05:00
|
|
|
}
|
|
|
|
|
table td {
|
|
|
|
|
padding: 3px 20px;
|
2018-07-25 15:28:12 -05:00
|
|
|
border: 1px var(--table-border-color) solid;
|
|
|
|
|
}
|
|
|
|
|
table thead {
|
|
|
|
|
background: var(--table-header-bg);
|
2018-07-25 14:46:17 -05:00
|
|
|
}
|
|
|
|
|
table thead td {
|
2018-07-25 15:28:12 -05:00
|
|
|
font-weight: 700;
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
2018-11-15 13:32:36 +01:00
|
|
|
table thead th {
|
|
|
|
|
padding: 3px 20px;
|
|
|
|
|
}
|
2018-07-25 15:28:12 -05:00
|
|
|
table thead tr {
|
|
|
|
|
border: 1px var(--table-header-bg) solid;
|
|
|
|
|
}
|
|
|
|
|
/* Alternate background colors for rows */
|
|
|
|
|
table tbody tr:nth-child(2n) {
|
|
|
|
|
background: var(--table-alternate-bg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
blockquote {
|
|
|
|
|
margin: 20px 0;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
color: var(--fg);
|
|
|
|
|
background-color: var(--quote-bg);
|
2021-03-15 17:42:44 -06:00
|
|
|
border-block-start: .1em solid var(--quote-border);
|
|
|
|
|
border-block-end: .1em solid var(--quote-border);
|
2016-01-03 13:47:59 +01:00
|
|
|
}
|
2018-02-02 13:15:48 +01:00
|
|
|
|
2023-09-08 13:14:54 -07:00
|
|
|
.warning {
|
|
|
|
|
margin: 20px;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
border-inline-start: 2px solid var(--warning-border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.warning:before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 3rem;
|
|
|
|
|
height: 3rem;
|
|
|
|
|
margin-inline-start: calc(-1.5rem - 21px);
|
|
|
|
|
content: "ⓘ";
|
|
|
|
|
text-align: center;
|
|
|
|
|
background-color: var(--bg);
|
|
|
|
|
color: var(--warning-border);
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
blockquote .warning:before {
|
|
|
|
|
background-color: var(--quote-bg);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-06 16:02:29 -04:00
|
|
|
kbd {
|
|
|
|
|
background-color: var(--table-border-color);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
border: solid 1px var(--theme-popup-border);
|
|
|
|
|
box-shadow: inset 0 -1px 0 var(--theme-hover);
|
|
|
|
|
display: inline-block;
|
|
|
|
|
font-size: var(--code-font-size);
|
|
|
|
|
font-family: var(--mono-font);
|
|
|
|
|
line-height: 10px;
|
|
|
|
|
padding: 4px 5px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
2018-07-25 15:28:12 -05:00
|
|
|
|
2024-11-02 16:09:14 -07:00
|
|
|
sup {
|
|
|
|
|
/* Set the line-height for superscript and footnote references so that there
|
|
|
|
|
isn't an awkward space appearing above lines that contain the footnote.
|
|
|
|
|
|
|
|
|
|
See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583
|
|
|
|
|
for an explanation.
|
|
|
|
|
*/
|
|
|
|
|
line-height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-16 00:44:03 +01:00
|
|
|
:not(.footnote-definition) + .footnote-definition {
|
2021-03-15 17:42:44 -06:00
|
|
|
margin-block-start: 2em;
|
2018-02-02 13:15:48 +01:00
|
|
|
}
|
2025-01-16 00:44:03 +01:00
|
|
|
.footnote-definition:not(:has(+ .footnote-definition)) {
|
|
|
|
|
margin-block-end: 2em;
|
|
|
|
|
}
|
2018-02-02 13:15:48 +01:00
|
|
|
.footnote-definition {
|
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
margin: 0.5em 0;
|
2018-07-25 14:46:17 -05:00
|
|
|
}
|
|
|
|
|
.footnote-definition p {
|
|
|
|
|
display: inline;
|
2018-02-02 13:15:48 +01:00
|
|
|
}
|
2018-07-25 15:28:12 -05:00
|
|
|
|
|
|
|
|
.tooltiptext {
|
|
|
|
|
position: absolute;
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
color: #fff;
|
|
|
|
|
background-color: #333;
|
|
|
|
|
transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
|
|
|
|
|
left: -8px; /* Half of the width of the icon */
|
|
|
|
|
top: -35px;
|
|
|
|
|
font-size: 0.8em;
|
|
|
|
|
text-align: center;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: 5px 8px;
|
|
|
|
|
margin: 5px;
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
}
|
|
|
|
|
.tooltipped .tooltiptext {
|
|
|
|
|
visibility: visible;
|
|
|
|
|
}
|
2020-03-20 21:18:07 -05:00
|
|
|
|
|
|
|
|
.chapter li.part-title {
|
|
|
|
|
color: var(--sidebar-fg);
|
|
|
|
|
margin: 5px 0px;
|
2020-03-20 21:29:17 -05:00
|
|
|
font-weight: bold;
|
2020-03-20 21:18:07 -05:00
|
|
|
}
|
2021-07-07 10:44:51 -07:00
|
|
|
|
|
|
|
|
.result-no-output {
|
|
|
|
|
font-style: italic;
|
|
|
|
|
}
|