| 1 | body { |
| 2 | font-family: sans-serif; |
| 3 | max-width: 800px; |
| 4 | margin: auto; |
| 5 | padding: 1em; |
| 6 | line-height: 1.5; |
| 7 | print-color-adjust: exact; |
| 8 | -webkit-print-color-adjust: exact; |
| 9 | } |
| 10 | body, .abstract, code, .footnotes, footer, #refs, .caption { font-size: .9em; } |
| 11 | li li { font-size: .95em; } |
| 12 | ul:has(li > input[type="checkbox"]) { list-style: none; padding-left: 1em; } |
| 13 | *, :before, :after { box-sizing: border-box; } |
| 14 | a { color: steelblue; } |
| 15 | pre, img { max-width: 100%; } |
| 16 | pre { white-space: pre-wrap; word-break: break-word; } |
| 17 | pre code { display: block; padding: 1em; overflow-x: auto; } |
| 18 | code { font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace; } |
| 19 | :not(pre, th) > code, code[class], div > .caption { background: #f8f8f8; } |
| 20 | pre > code:is(:not([class]), .language-plain, .language-none, .plain), .box, .figure, .table { background: inherit; border: 1px solid #eee; } |
| 21 | pre > code { |
| 22 | &.message { border-color: #9eeaf9; } |
| 23 | &.warning { background: #fff3cd; border-color: #fff3cd; } |
| 24 | &.error { background: #f8d7da; border-color: #f8d7da; } |
| 25 | } |
| 26 | .fenced-chunk { border-left: 1px solid #666; } |
| 27 | .code-fence { |
| 28 | opacity: .4; |
| 29 | border: 1px dashed #666; |
| 30 | border-left: 2px solid; |
| 31 | &:hover { opacity: inherit; } |
| 32 | } |
| 33 | .box, .figure, .table, table { margin: 1em auto; } |
| 34 | div > .caption { padding: 1px 1em; } |
| 35 | .figure { p:has(img, svg), pre:has(svg) { text-align: center; } } |
| 36 | .flex-col { display: flex; justify-content: space-between; } |
| 37 | table { |
| 38 | &:only-child:not(.table > *) { margin: auto; } |
| 39 | th, td { padding: 5px; font-variant-numeric: tabular-nums; } |
| 40 | thead, tfoot, tr:nth-child(even) { background: whitesmoke; } |
| 41 | thead th { border-bottom: 1px solid #ddd; } |
| 42 | &:not(.datatable-table) { |
| 43 | border-top: 1px solid #666; |
| 44 | border-bottom: 1px solid #666; |
| 45 | } |
| 46 | } |
| 47 | blockquote { |
| 48 | color: #666; |
| 49 | margin: 0; |
| 50 | padding: 1px 1em; |
| 51 | border-left: .5em solid #eee; |
| 52 | } |
| 53 | hr, .footnotes::before { border: 1px dashed #ddd; } |
| 54 | .frontmatter { text-align: center; } |
| 55 | #TOC { |
| 56 | a { text-decoration: none; } |
| 57 | ul { list-style: none; padding-left: 1em; } |
| 58 | & > ul { padding: 0; } |
| 59 | ul ul { border-left: 1px solid lightsteelblue; } |
| 60 | } |
| 61 | .body h2 { border-bottom: 1px solid #666; } |
| 62 | .body .appendix, .appendix ~ h2 { border-bottom-style: dashed; } |
| 63 | .main-number::after { content: "."; } |
| 64 | span[class^="ref-number-"] { font-weight: bold; } |
| 65 | .ref-number-fig::after, .ref-number-tab::after { content: ":"; } |
| 66 | .cross-ref-chp::before { content: "Chapter "; } |
| 67 | .cross-ref-sec::before { content: "Section "; } |
| 68 | .cross-ref-fig::before, .ref-number-fig::before { content: "Figure "; } |
| 69 | .cross-ref-tab::before, .ref-number-tab::before { content: "Table "; } |
| 70 | .cross-ref-eqn::before, .MathJax_ref:has(mjx-mtext > mjx-c + mjx-c)::before { content: "Equation "; } |
| 71 | .abstract, #refs { |
| 72 | &::before { display: block; margin: 1em auto; font-weight: bold; } |
| 73 | } |
| 74 | .abstract::before { content: "Abstract"; text-align: center; } |
| 75 | #refs::before { content: "Bibliography"; font-size: 1.5em; } |
| 76 | .ref-paren-open::before { content: "("; } |
| 77 | .ref-paren-close::after { content: ")"; } |
| 78 | .ref-semicolon::after { content: "; "; } |
| 79 | .ref-and::after { content: " and "; } |
| 80 | .ref-et-al::after { content: " et al."; font-style: italic; } |
| 81 | .footnote-ref a { |
| 82 | &::before { content: "["; } |
| 83 | &::after { content: "]"; } |
| 84 | } |
| 85 | section.footnotes { |
| 86 | margin-top: 2em; |
| 87 | &::before { content: ""; display: block; max-width: 20em; } |
| 88 | } |
| 89 | .fade { |
| 90 | background: repeating-linear-gradient(135deg, white, white 30px, #ddd 32px, #ddd 32px); |
| 91 | opacity: 0.6; |
| 92 | } |
| 93 | |
| 94 | @media print { |
| 95 | body { max-width: 100%; } |
| 96 | tr, img { break-inside: avoid; } |
| 97 | } |
| 98 | @media only screen and (min-width: 992px) { |
| 99 | body:not(.pagesjs) pre:has(.line-numbers):not(:hover) { white-space: pre; } |
| 100 | } |