1
0

minimal.css 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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 9079 2022-06-19 14:00:56Z 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. /* This CSS3 stylesheet defines rules for Docutils elements without */
  17. /* HTML equivalent. It is required to make the document semantics visible. */
  18. /* */
  19. /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
  20. /* titles */
  21. p.topic-title,
  22. p.admonition-title,
  23. p.system-message-title {
  24. font-weight: bold;
  25. }
  26. p.sidebar-title,
  27. p.rubric {
  28. font-weight: bold;
  29. font-size: larger;
  30. }
  31. p.rubric {
  32. color: maroon;
  33. }
  34. p.subtitle,
  35. p.section-subtitle,
  36. p.sidebar-subtitle {
  37. font-weight: bold;
  38. margin-top: -0.5em;
  39. }
  40. h1 + p.subtitle {
  41. font-size: 1.6em;
  42. }
  43. a.toc-backref {
  44. color: inherit;
  45. text-decoration: none;
  46. }
  47. /* Warnings, Errors */
  48. .system-messages h2,
  49. .system-message-title,
  50. span.problematic {
  51. color: red;
  52. }
  53. /* Inline Literals */
  54. .docutils.literal {
  55. font-family: monospace;
  56. white-space: pre-wrap;
  57. }
  58. /* do not wrap at hyphens and similar: */
  59. .literal > span.pre { white-space: nowrap; }
  60. /* Lists */
  61. /* compact and simple lists: no margin between items */
  62. .simple li, .simple ul, .simple ol,
  63. .compact li, .compact ul, .compact ol,
  64. .simple > li p, dl.simple > dd,
  65. .compact > li p, dl.compact > dd {
  66. margin-top: 0;
  67. margin-bottom: 0;
  68. }
  69. /* Nested Paragraphs */
  70. p:first-child { margin-top: 0; }
  71. p:last-child { margin-bottom: 0; }
  72. details > p:last-child { margin-bottom: 1em; }
  73. /* Table of Contents */
  74. .contents ul.auto-toc { /* section numbers present */
  75. list-style-type: none;
  76. }
  77. /* Enumerated Lists */
  78. ol.arabic { list-style: decimal }
  79. ol.loweralpha { list-style: lower-alpha }
  80. ol.upperalpha { list-style: upper-alpha }
  81. ol.lowerroman { list-style: lower-roman }
  82. ol.upperroman { list-style: upper-roman }
  83. /* Definition Lists and Derivatives */
  84. dt .classifier { font-style: italic }
  85. dt .classifier:before {
  86. font-style: normal;
  87. margin: 0.5em;
  88. content: ":";
  89. }
  90. /* Field Lists and similar */
  91. /* bold field name, content starts on the same line */
  92. dl.field-list,
  93. dl.option-list,
  94. dl.docinfo {
  95. display: flow-root;
  96. }
  97. dl.field-list > dt,
  98. dl.option-list > dt,
  99. dl.docinfo > dt {
  100. font-weight: bold;
  101. clear: left;
  102. float: left;
  103. margin: 0;
  104. padding: 0;
  105. padding-right: 0.2em;
  106. }
  107. /* Offset for field content (corresponds to the --field-name-limit option) */
  108. dl.field-list > dd,
  109. dl.option-list > dd,
  110. dl.docinfo > dd {
  111. margin-left: 9em; /* ca. 14 chars in the test examples, fit all Docinfo fields */
  112. }
  113. /* start nested lists on new line */
  114. dd > dl:first-child,
  115. dd > ul:first-child,
  116. dd > ol:first-child {
  117. clear: left;
  118. }
  119. /* start field-body on a new line after long field names */
  120. dl.field-list > dd > *:first-child,
  121. dl.option-list > dd > *:first-child
  122. {
  123. display: inline-block;
  124. width: 100%;
  125. margin: 0;
  126. }
  127. /* Bibliographic Fields (docinfo) */
  128. dl.docinfo pre.address {
  129. font: inherit;
  130. margin: 0.5em 0;
  131. }
  132. dl.docinfo > dd.authors > p { margin: 0; }
  133. /* Option Lists */
  134. dl.option-list > dt { font-weight: normal; }
  135. span.option { white-space: nowrap; }
  136. /* Footnotes and Citations */
  137. .footnote, .citation { margin: 1em 0; } /* default paragraph skip (Firefox) */
  138. /* hanging indent */
  139. .citation { padding-left: 2em; }
  140. .footnote { padding-left: 1.7em; }
  141. .footnote.superscript { padding-left: 1.0em; }
  142. .citation > .label { margin-left: -2em; }
  143. .footnote > .label { margin-left: -1.7em; }
  144. .footnote.superscript > .label { margin-left: -1.0em; }
  145. .footnote > .label + *,
  146. .citation > .label + * {
  147. display: inline-block;
  148. margin-top: 0;
  149. vertical-align: top;
  150. }
  151. .footnote > .backrefs + *,
  152. .citation > .backrefs + * {
  153. margin-top: 0;
  154. }
  155. .footnote > .label + p, .footnote > .backrefs + p,
  156. .citation > .label + p, .citation > .backrefs + p {
  157. display: inline;
  158. vertical-align: inherit;
  159. }
  160. .backrefs { user-select: none; }
  161. .backrefs > a { font-style: italic; }
  162. /* superscript footnotes */
  163. a[role="doc-noteref"].superscript,
  164. .footnote.superscript > .label,
  165. .footnote.superscript > .backrefs {
  166. vertical-align: super;
  167. font-size: smaller;
  168. line-height: 1;
  169. }
  170. a[role="doc-noteref"].superscript > .fn-bracket,
  171. .footnote.superscript > .label > .fn-bracket {
  172. /* hide brackets in display but leave for copy/paste */
  173. display: inline-block;
  174. width: 0;
  175. overflow: hidden;
  176. }
  177. [role="doc-noteref"].superscript + [role="doc-noteref"].superscript {
  178. padding-left: 0.15em; /* separate consecutive footnote references */
  179. /* TODO: unfortunately, "+" also selects with text between the references. */
  180. }
  181. /* Alignment */
  182. .align-left {
  183. text-align: left;
  184. margin-right: auto;
  185. }
  186. .align-center {
  187. text-align: center;
  188. margin-left: auto;
  189. margin-right: auto;
  190. }
  191. .align-right {
  192. text-align: right;
  193. margin-left: auto;
  194. }
  195. .align-top { vertical-align: top; }
  196. .align-middle { vertical-align: middle; }
  197. .align-bottom { vertical-align: bottom; }
  198. /* reset inner alignment in figures and tables */
  199. figure.align-left, figure.align-right,
  200. table.align-left, table.align-center, table.align-right {
  201. text-align: inherit;
  202. }
  203. /* Text Blocks */
  204. .topic { margin: 1em 2em; }
  205. .sidebar,
  206. .admonition,
  207. .system-message {
  208. margin: 1em 2em;
  209. border: thin solid;
  210. padding: 0.5em 1em;
  211. }
  212. div.line-block { display: block; }
  213. div.line-block div.line-block, pre { margin-left: 2em; }
  214. /* Code line numbers: dropped when copying text from the page */
  215. pre.code .ln { display: none; }
  216. pre.code code:before {
  217. content: attr(data-lineno); /* …, none) fallback not supported by any browser */
  218. color: gray;
  219. }
  220. /* Tables */
  221. table {
  222. border-collapse: collapse;
  223. }
  224. td, th {
  225. border: thin solid silver;
  226. padding: 0 1ex;
  227. }
  228. .borderless td, .borderless th {
  229. border: 0;
  230. padding: 0;
  231. padding-right: 0.5em /* separate table cells */
  232. }
  233. table > caption {
  234. text-align: left;
  235. margin-top: 0.2em;
  236. margin-bottom: 0.2em;
  237. }
  238. table.captionbelow {
  239. caption-side: bottom;
  240. }
  241. /* Document Header and Footer */
  242. header { border-bottom: 1px solid black; }
  243. footer { border-top: 1px solid black; }
  244. /* Images are block-level by default in Docutils */
  245. /* New HTML5 block elements: set display for older browsers */
  246. img, header, footer, main, aside, nav, section, figure, video, details {
  247. display: block;
  248. }
  249. /* inline images */
  250. p img, p video, figure img, figure video {
  251. display: inline;
  252. }