minimal.css
1 /* Minimal style sheet for the HTML output of Docutils. */ 2 /* */ 3 /* :Author: Günter Milde, based on html4css1.css by David Goodger */ 4 /* :Id: $Id: minimal.css 10018 2025-03-06 16:19:15Z milde $ */ 5 /* :Copyright: © 2015, 2021 Günter Milde. */ 6 /* :License: Released under the terms of the `2-Clause BSD license`_, */ 7 /* in short: */ 8 /* */ 9 /* Copying and distribution of this file, with or without modification, */ 10 /* are permitted in any medium without royalty provided the copyright */ 11 /* notice and this notice are preserved. */ 12 /* */ 13 /* This file is offered as-is, without any warranty. */ 14 /* */ 15 /* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */ 16 17 /* This CSS3 stylesheet defines rules for Docutils elements without */ 18 /* HTML equivalent. It is required to make the document semantics visible. */ 19 /* */ 20 /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */ 21 22 /* titles */ 23 p.topic-title, 24 p.admonition-title, 25 p.system-message-title { 26 font-weight: bold; 27 } 28 p.sidebar-title, 29 p.rubric { 30 font-weight: bold; 31 font-size: larger; 32 } 33 p.rubric { 34 color: maroon; 35 } 36 p.subtitle, 37 p.section-subtitle, 38 p.sidebar-subtitle { 39 font-weight: bold; 40 margin-top: -0.5em; 41 } 42 h1 + p.subtitle { 43 font-size: 1.6em; 44 } 45 a.toc-backref { 46 color: inherit; 47 text-decoration: none; 48 } 49 50 /* Warnings, Errors */ 51 .system-messages h2, 52 .system-message-title, 53 pre.problematic, 54 span.problematic { 55 color: red; 56 } 57 58 /* Inline Literals */ 59 .docutils.literal { 60 font-family: monospace; 61 white-space: pre-wrap; 62 } 63 /* do not wrap at hyphens and similar: */ 64 .literal > span.pre { white-space: nowrap; } 65 66 /* keep line-breaks (\n) visible */ 67 .pre-wrap { white-space: pre-wrap; } 68 69 /* Lists */ 70 71 /* compact and simple lists: no margin between items */ 72 .simple li, .simple ul, .simple ol, .simple > li p, 73 .compact li, .compact ul, .compact ol, .compact > li p, 74 dl.simple > dd, dl.compact > dd, dl.docinfo > dd { 75 margin-top: 0; 76 margin-bottom: 0; 77 } 78 /* Nested Paragraphs */ 79 p:first-child { margin-top: 0; } 80 p:last-child { margin-bottom: 0; } 81 details > p:last-child { margin-bottom: 1em; } 82 83 /* Table of Contents */ 84 .contents ul.auto-toc { /* section numbers present */ 85 list-style-type: none; 86 } 87 88 /* Enumerated Lists */ 89 ol.arabic { list-style: decimal } 90 ol.loweralpha { list-style: lower-alpha } 91 ol.upperalpha { list-style: upper-alpha } 92 ol.lowerroman { list-style: lower-roman } 93 ol.upperroman { list-style: upper-roman } 94 95 /* Definition Lists and Derivatives */ 96 dt .classifier { font-style: italic } 97 dt .classifier:before { 98 font-style: normal; 99 margin: 0.5em; 100 content: ":"; 101 } 102 /* Field Lists and similar */ 103 /* bold field name, content starts on the same line */ 104 dl.field-list, 105 dl.option-list, 106 dl.docinfo { 107 display: flow-root; 108 } 109 dl.field-list > dt, 110 dl.option-list > dt, 111 dl.docinfo > dt { 112 font-weight: bold; 113 clear: left; 114 float: left; 115 margin: 0; 116 padding: 0; 117 padding-right: 0.25em; 118 } 119 /* Offset for field content (corresponds to the --field-name-limit option) */ 120 dl.field-list > dd, 121 dl.option-list > dd, 122 dl.docinfo > dd { 123 margin-left: 9em; /* ca. 14 chars in the test examples, fit all Docinfo fields */ 124 } 125 /* start nested lists on new line */ 126 dd > dl:first-child, 127 dd > ul:first-child, 128 dd > ol:first-child { 129 clear: left; 130 } 131 /* start field-body on a new line after long field names */ 132 dl.field-list > dd > *:first-child, 133 dl.option-list > dd > *:first-child 134 { 135 display: inline-block; 136 width: 100%; 137 margin: 0; 138 } 139 140 /* Bibliographic Fields (docinfo) */ 141 dl.docinfo pre.address { 142 font: inherit; 143 margin: 0; 144 } 145 dl.docinfo > dd.authors > p { margin: 0; } 146 147 /* Option Lists */ 148 dl.option-list > dt { font-weight: normal; } 149 span.option { white-space: nowrap; } 150 151 /* Footnotes and Citations */ 152 153 .footnote, .citation { margin: 1em 0; } /* default paragraph skip (Firefox) */ 154 /* hanging indent */ 155 .citation { padding-left: 2em; } 156 .footnote { padding-left: 1.7em; } 157 .footnote.superscript { padding-left: 1.0em; } 158 .citation > .label { margin-left: -2em; } 159 .footnote > .label { margin-left: -1.7em; } 160 .footnote.superscript > .label { margin-left: -1.0em; } 161 162 .footnote > .label + *, 163 .citation > .label + * { 164 display: inline-block; 165 margin-top: 0; 166 vertical-align: top; 167 } 168 .footnote > .backrefs + *, 169 .citation > .backrefs + * { 170 margin-top: 0; 171 } 172 .footnote > .label + p, .footnote > .backrefs + p, 173 .citation > .label + p, .citation > .backrefs + p { 174 display: inline; 175 vertical-align: inherit; 176 } 177 178 .backrefs { user-select: none; } 179 .backrefs > a { font-style: italic; } 180 181 /* superscript footnotes */ 182 a[role="doc-noteref"].superscript, 183 .footnote.superscript > .label, 184 .footnote.superscript > .backrefs { 185 vertical-align: super; 186 font-size: smaller; 187 line-height: 1; 188 } 189 a[role="doc-noteref"].superscript > .fn-bracket, 190 .footnote.superscript > .label > .fn-bracket { 191 /* hide brackets in display but leave for copy/paste */ 192 display: inline-block; 193 width: 0; 194 overflow: hidden; 195 } 196 [role="doc-noteref"].superscript + [role="doc-noteref"].superscript { 197 padding-left: 0.15em; /* separate consecutive footnote references */ 198 /* TODO: unfortunately, "+" also selects with text between the references. */ 199 } 200 201 /* Alignment */ 202 .align-left { 203 text-align: left; 204 margin-right: auto; 205 } 206 .align-center { 207 text-align: center; 208 margin-left: auto; 209 margin-right: auto; 210 } 211 .align-right { 212 text-align: right; 213 margin-left: auto; 214 } 215 .align-top { vertical-align: top; } 216 .align-middle { vertical-align: middle; } 217 .align-bottom { vertical-align: bottom; } 218 219 /* reset inner alignment in figures and tables */ 220 figure.align-left, figure.align-right, 221 table.align-left, table.align-center, table.align-right { 222 text-align: inherit; 223 } 224 225 /* Text Blocks */ 226 .topic { margin: 1em 2em; } 227 .sidebar, 228 .admonition, 229 .system-message { 230 margin: 1em 2em; 231 border: thin solid; 232 padding: 0.5em 1em; 233 } 234 div.line-block { display: block; } 235 div.line-block div.line-block, pre { margin-left: 2em; } 236 237 /* Code line numbers: don't copy with drag-and-drop */ 238 pre.code .ln { display: none; } 239 pre.code code:before { 240 content: attr(data-lineno); 241 font-size: small; 242 color: gray; 243 } 244 245 /* Tables */ 246 table { 247 border-collapse: collapse; 248 } 249 td, th { 250 border: thin solid silver; 251 padding: 0 1ex; 252 } 253 .borderless td, .borderless th { 254 border: 0; 255 padding: 0; 256 padding-right: 0.5em /* separate table cells */ 257 } 258 259 table > caption, figcaption { 260 text-align: left; 261 margin-top: 0.2em; 262 margin-bottom: 0.2em; 263 } 264 table.captionbelow { 265 caption-side: bottom; 266 } 267 268 /* MathML (see "math.css" for --math-output=HTML) */ 269 math .boldsymbol { font-weight: bold; } 270 math.boxed, math .boxed {padding: 0.25em; border: thin solid; } 271 /* style table similar to AMS "align" or "aligned" environment: */ 272 mtable.cases > mtr > mtd { text-align: left; } 273 mtable.ams-align > mtr > mtd { padding-left: 0; padding-right: 0; } 274 mtable.ams-align > mtr > mtd:nth-child(2n) { text-align: left; } 275 mtable.ams-align > mtr > mtd:nth-child(2n+1) { text-align: right; } 276 mtable.ams-align > mtr > mtd:nth-child(2n+3) { padding-left: 2em; } 277 .mathscr mi, mi.mathscr { 278 font-family: STIX, XITSMathJax_Script, rsfs10, 279 "Asana Math", Garamond, cursive; 280 } 281 282 /* Document Header and Footer */ 283 header { border-bottom: 1px solid black; } 284 footer { border-top: 1px solid black; } 285 286 /* Images are block-level by default in Docutils */ 287 /* New HTML5 block elements: set display for older browsers */ 288 img, svg, header, footer, main, aside, nav, section, figure, video, details { 289 display: block; 290 } 291 svg { width: auto; height: auto; } /* enable scaling of SVG images */ 292 /* inline images */ 293 294 p img, p svg, p video, 295 h1 img, h2 img, h3 img, h4 img, h5 img, h6 img, 296 h1 svg, h2 svg, h3 svg, h4 svg, h5 svg, h6 svg { 297 display: inline; 298 }