11/* Minimal style sheet for the HTML output of Docutils. */
22/* */
33/* :Author: Günter Milde, based on html4css1.css by David Goodger */
4- /* :Id: $Id: minimal.css 8642 2021-03-26 13:51:14Z milde $ */
5- /* :Copyright: © 2015 Günter Milde. */
4+ /* :Id: $Id: minimal.css 9079 2022-06-19 14:00:56Z milde $ */
5+ /* :Copyright: © 2015, 2021 Günter Milde. */
66/* :License: Released under the terms of the `2-Clause BSD license`_, */
77/* in short: */
88/* */
1414/* */
1515/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
1616
17- /* This CSS2.1_ stylesheet defines rules for Docutils elements without */
18- /* HTML equivalent. It is required to make the document semantic visible. */
19- /* */
20- /* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
21- /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
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 */
2221
2322/* titles */
2423p .topic-title ,
@@ -43,8 +42,8 @@ p.sidebar-subtitle {
4342h1 + p .subtitle {
4443 font-size : 1.6em ;
4544}
46- h2 + p . section-subtitle , a .toc-backref {
47- color : black ;
45+ a .toc-backref {
46+ color : inherit ;
4847 text-decoration : none;
4948}
5049
@@ -73,12 +72,14 @@ span.problematic {
7372 margin-top : 0 ;
7473 margin-bottom : 0 ;
7574}
75+ /* Nested Paragraphs */
76+ p : first-child { margin-top : 0 ; }
77+ p : last-child { margin-bottom : 0 ; }
78+ details > p : last-child { margin-bottom : 1em ; }
7679
7780/* Table of Contents */
78- .topic .contents { margin : 0.5em 0 ; }
79- .topic .contents ul .auto-toc {
81+ .contents ul .auto-toc { /* section numbers present */
8082 list-style-type : none;
81- padding-left : 1.5em ;
8283}
8384
8485/* Enumerated Lists */
@@ -97,6 +98,13 @@ dt .classifier:before {
9798}
9899/* Field Lists and similar */
99100/* bold field name, content starts on the same line */
101+ dl .field-list ,
102+ dl .option-list ,
103+ dl .docinfo ,
104+ dl .footnote ,
105+ dl .citation {
106+ display : flow-root;
107+ }
100108dl .field-list > dt ,
101109dl .option-list > dt ,
102110dl .docinfo > dt ,
@@ -107,14 +115,20 @@ dl.citation > dt {
107115 float : left;
108116 margin : 0 ;
109117 padding : 0 ;
110- padding-right : 0.5 em ;
118+ padding-right : 0.2 em ;
111119}
112120/* Offset for field content (corresponds to the --field-name-limit option) */
113121dl .field-list > dd ,
114122dl .option-list > dd ,
115123dl .docinfo > dd {
116124 margin-left : 9em ; /* ca. 14 chars in the test examples, fit all Docinfo fields */
117125}
126+ /* start nested lists on new line */
127+ dd > dl : first-child ,
128+ dd > ul : first-child ,
129+ dd > ol : first-child {
130+ clear : left;
131+ }
118132/* start field-body on a new line after long field names */
119133dl .field-list > dd > * : first-child ,
120134dl .option-list > dd > * : first-child
@@ -135,7 +149,6 @@ dl.docinfo > dd.authors > p { margin: 0; }
135149dl .option-list > dt { font-weight : normal; }
136150span .option { white-space : nowrap; }
137151
138-
139152/* Footnotes and Citations */
140153
141154.footnote , .citation { margin : 1em 0 ; } /* default paragraph skip (Firefox) */
@@ -209,7 +222,6 @@ dt.label > span.fn-backref > a { font-style: italic; }
209222 margin-right : auto;
210223}
211224.align-center {
212- clear : both;
213225 text-align : center;
214226 margin-left : auto;
215227 margin-right : auto;
@@ -222,31 +234,27 @@ dt.label > span.fn-backref > a { font-style: italic; }
222234.align-middle { vertical-align : middle; }
223235.align-bottom { vertical-align : bottom; }
224236
237+ img .align-left , img .align-center , img .align-right ,
238+ .figure .align-left , .figure .align-center , .figure .align-right ,
239+ object .align-left , object .align-center , object .align-right {
240+ display : block;
241+ }
242+
225243/* reset inner alignment in figures and tables */
226244figure .align-left , figure .align-right ,
227245table .align-left , table .align-center , table .align-right {
228246 text-align : inherit;
229247}
230248
231249/* Text Blocks */
232- blockquote ,
233- div .topic ,
234- aside .topic {
235- margin : 1em 2em ;
236- }
250+ .topic { margin : 1em 2em ; }
237251.sidebar ,
238252.admonition ,
239253.system-message {
240- border : thin solid;
241254 margin : 1em 2em ;
255+ border : thin solid;
242256 padding : 0.5em 1em ;
243257}
244- .sidebar {
245- width : 30% ;
246- max-width : 26em ;
247- float : right;
248- clear : right;
249- }
250258div .line-block { display : block; }
251259div .line-block div .line-block , pre { margin-left : 2em ; }
252260
@@ -258,7 +266,6 @@ pre.code code:before {
258266}
259267
260268/* Tables */
261-
262269td > p : first-child , th > p : first-child { margin-top : 0 ; }
263270td > p , th > p { margin-bottom : 0 ; }
264271
@@ -268,11 +275,20 @@ td > p, th > p { margin-bottom: 0; }
268275 padding-right : 0.5em /* separate table cells */
269276}
270277
278+ table > caption {
279+ text-align : left;
280+ margin-top : 0.2em ;
281+ margin-bottom : 0.2em ;
282+ }
283+ table .captionbelow {
284+ caption-side : bottom;
285+ }
286+
271287/* CSS31_ style sheet for the output of Docutils HTML writers. */
272288/* Rules for easy reading and pre-defined style variants. */
273289/* */
274290/* :Author: Günter Milde, based on html4css1.css by David Goodger */
275- /* :Id: $Id: plain.css 8636 2021-03 -19 00 :23:33Z milde $ */
291+ /* :Id: $Id: plain.css 9081 2022-06 -19 20 :23:12Z milde $ */
276292/* :Copyright: © 2015 Günter Milde. */
277293/* :License: Released under the terms of the `2-Clause BSD license`_, */
278294/* in short: */
@@ -284,12 +300,27 @@ td > p, th > p { margin-bottom: 0; }
284300/* This file is offered as-is, without any warranty. */
285301/* */
286302/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
287- /* .. _CSS3: http ://www.w3.org/TR/CSS3 */
303+ /* .. _CSS3: https ://www.w3.org/Style/CSS/ */
288304
289305
290306/* Document Structure */
291307/* ****************** */
292308
309+ /* Table of Contents */
310+ ul .auto-toc > li > p {
311+ padding-left : 1em ;
312+ text-indent : -1em ;
313+ }
314+ nav .contents ul {
315+ padding-left : 1em ;
316+ }
317+ main > nav .contents ul ul ul ul : not (.auto-toc ) {
318+ list-style-type : '\2B29\ ' ;
319+ }
320+ main > nav .contents ul ul ul ul ul : not (.auto-toc ) {
321+ list-style-type : '\2B1D\ ' ;
322+ }
323+
293324/* Transitions */
294325hr .docutils {
295326 width : 80% ;
@@ -305,30 +336,39 @@ dl > dd {
305336/* Lists */
306337/* ===== */
307338
308- /* Separate list entries in compound lists */
309- dl > dd , ol > li ,
310-
311339/* Definition Lists */
312340/* Indent lists nested in definition lists */
313- /* (:only-child is new in CSS 3) */
314341dd > ul : only-child , dd > ol : only-child { padding-left : 1em ; }
315342
316343/* Description Lists */
317344/* styled like in most dictionaries, encyclopedias etc. */
345+ dl .description {
346+ display : flow-root;
347+ }
318348dl .description > dt {
319349 font-weight : bold;
320350 clear : left;
321351 float : left;
322352 margin : 0 ;
323353 padding : 0 ;
324- padding-right : 0.5em ;
354+ padding-right : 0.3em ;
355+ }
356+ dl .description > dd : after {
357+ display : table;
358+ content : "" ;
359+ clear : left; /* clearfix for empty descriptions */
325360}
326361
327362/* Field Lists */
328363
364+ dl .field-list > dd ,
365+ dl .docinfo > dd {
366+ margin-left : var (--field-indent ); /* adapted in media queries or HTML */
367+ }
368+
329369/* example for custom field-name width */
330370dl .field-list .narrow > dd {
331- margin-left : 5em ;
371+ --field-indent : 5em ;
332372}
333373/* run-in: start field-body on same line after long field names */
334374dl .field-list .run-in > dd p {
@@ -337,8 +377,8 @@ dl.field-list.run-in > dd p {
337377
338378/* Bibliographic Fields */
339379
340- /* generally, bibliographic fields use special definition list dl.docinfo */
341- /* but dedication and abstract are placed into "topic" divs */
380+ /* generally, bibliographic fields use dl.docinfo */
381+ /* but dedication and abstract are placed into divs */
342382div .abstract p .topic-title {
343383 text-align : center;
344384}
@@ -351,6 +391,10 @@ div.dedication p.topic-title {
351391 font-style : normal;
352392}
353393
394+ /* disclosures */
395+ details { padding-left : 1em ; }
396+ summary { margin-left : -1em ; }
397+
354398/* Text Blocks */
355399/* =========== */
356400
@@ -360,14 +404,9 @@ pre.math, pre.code {
360404 font-family : monospace;
361405}
362406
363- /* Block Quotes */
364- blockquote > table ,
365- div .topic > table {
366- margin-top : 0 ;
367- margin-bottom : 0 ;
368- }
407+ /* Block Quotes and Topics */
369408blockquote p .attribution ,
370- div .topic p .attribution {
409+ .topic p .attribution {
371410 text-align : right;
372411 margin-left : 20% ;
373412}
@@ -468,7 +507,9 @@ div.error {
468507aside .sidebar {
469508 width : 30% ;
470509 max-width : 26em ;
510+ float : right;
511+ clear : right;
471512 margin-left : 1em ;
472- margin-right : -2 % ;
473- background-color : # ffffee ;
513+ margin-right : -1 % ;
514+ background-color : # fffffa ;
474515}
0 commit comments