Debian Codegraph @

docutils/writers/html5_polyglot/tuftig.css

raw symbols SCIP
1 /* CSS3_ style sheet for the output of Docutils HTML writers. */
2 /* Rules inspired by Edward Tufte's layout design. */
3 /* */
4 /* :Author: Günter Milde */
5 /* based on tufte.css_ by Dave Liepmann */
6 /* and the tufte-latex_ package. */
7 /* */
8 /* :Id: $Id: tuftig.css 10079 2025-04-10 12:01:48Z milde $ */
9 /* :Copyright: © 2020 Günter Milde. */
10 /* :License: Released under the terms of the `2-Clause BSD license`_, */
11 /* in short: */
12 /* */
13 /* Copying and distribution of this file, with or without modification, */
14 /* are permitted in any medium without royalty provided the copyright */
15 /* notice and this notice are preserved. */
16 /* */
17 /* This file is offered as-is, without any warranty. */
18 /* */
19 /* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
20 /* .. _CSS3: https://www.w3.org/Style/CSS/ */
21 /* .. _tufte.css: https://edwardtufte.github.io/tufte-css/ */
22 /* .. _tufte-latex_: https://www.ctan.org/pkg/tufte-latex */
23
24
25 /* General Settings */
26 /* ================ */
27
28 body {
29 font-family: Georgia, serif;
30 background-color: #fafaf6;
31 font-size: 1.2em;
32 line-height: 1.4;
33 margin: auto;
34 }
35 main {
36 counter-reset: figure table;
37 }
38 main, header, footer {
39 padding: 0.5em 5%;
40 background-color: #fefef8;
41 max-width: 100rem;
42 }
43
44 /* Spacing */
45
46 /* vertical space (parskip) */
47 p, ol, ul, dl, li,
48 h1, h2, h3, h4, h5, h6,
49 div.line-block,
50 .topic,
51 .footnote, .citation,
52 table {
53 margin-top: 0.5em;
54 margin-bottom: 0.5em;
55 }
56 dl > dd {
57 margin-bottom: 0.5em;
58 }
59 /* exceptions */
60 p:first-child {
61 margin-top: 0;
62 }
63 p:last-child {
64 margin-bottom: 0;
65 }
66
67 /* Indented Blocks */
68 blockquote,
69 .topic {
70 /* background-color: Honeydew; */
71 margin: 0.5em 2%;
72 padding-left: 1em;
73 }
74 div.line-block div.line-block,
75 dl.option-list,
76 figure > img,
77 pre.literal-block, pre.math,
78 pre.doctest-block, pre.code {
79 /* background-color: LightCyan; */
80 margin-left: calc(2% + 1em);
81 }
82
83 /* Object styling */
84 /* ============== */
85
86 footer, header {
87 font-size: smaller;
88 }
89
90 /* Titles and Headings */
91
92 h2, h3, h4, p.subtitle, p.section-subtitle,
93 p.topic-title, p.sidebar-title, p.sidebar-subtitle {
94 font-weight: normal;
95 font-style: italic;
96 text-align: left;
97 }
98 .sectnum {
99 font-style: normal;
100 }
101
102 h1.title {
103 text-align: left;
104 margin-top: 2.4em;
105 margin-bottom: 2em;
106 font-size: 2.4em;
107 }
108 h1 + p.subtitle {
109 margin-top: -2em;
110 margin-bottom: 2em;
111 font-size: 2.0em;
112 }
113 section {
114 margin-top: 2em;
115 }
116 h2, .contents > p.topic-title {
117 font-size: 2.2em;
118 }
119 h2 + p.section-subtitle {
120 font-size: 1.6em;
121 }
122 h3 {
123 font-size: 1.2em;
124 }
125 h3 + p.section-subtitle {
126 font-size: 1.1em;
127 }
128 h4 {
129 font-size: 1em;
130 }
131 p.section-subtitle {
132 font-size: 1em;
133 }
134
135 /* Dedication and Abstract */
136 div.dedication {
137 padding: 0;
138 margin-left: 0;
139 font-style: italic;
140 font-size: 1.2em;
141 }
142 /* div.abstract p.topic-title, */
143 div.dedication p.topic-title {
144 display: none;
145 }
146
147 /* Attribution */
148 blockquote p.attribution {
149 text-align: right;
150 }
151
152 /* Table of Contents */
153 nav.contents {
154 padding: 0;
155 font-style: italic;
156 }
157 ul.auto-toc > li > p {
158 padding-left: 1em;
159 text-indent: -1em;
160 }
161 nav.contents ul {
162 padding-left: 1em;
163 }
164
165
166 /* Transitions */
167 hr {
168 border: 0;
169 border-top: 1px solid #ccc;
170 margin: 1em 10%;
171 }
172
173 /* Lists */
174 /* Less indent per level */
175 ul, ol {
176 padding-left: 1.1em;
177 }
178 dd {
179 margin-left: 1.5em;
180 }
181 dd > dl:first-child,
182 dd > ul:first-child,
183 dd > ol:first-child {
184 /* lists nested in definition/description/field lists */
185 clear: left;
186 }
187
188 dl.field-list > dd,
189 dl.docinfo > dd,
190 dl.option-list > dd {
191 margin-left: 4em;
192 }
193 /* example for custom field-name width */
194 dl.field-list.narrow > dd {
195 margin-left: 3em;
196 }
197 /* run-in: start field-body on same line after long field names */
198 dl.field-list.run-in > dd p {
199 display: block;
200 }
201 /* italic field name */
202 dl.description > dt,
203 dl.field-list > dt,
204 dl.docinfo > dt {
205 font-weight: normal;
206 font-style: italic;
207 }
208
209 /* "description style" like in most dictionaries, encyclopedias etc. */
210 dl.description > dt {
211 clear: left;
212 float: left;
213 margin: 0;
214 padding: 0;
215 padding-right: 0.5em;
216 }
217 dl.description > dd:after {
218 display: block;
219 content: "";
220 clear: both;
221 }
222
223 /* Citation list (style as description list) */
224 .citation-list,
225 .footnote-list {
226 display: contents;
227 }
228 .citation {
229 padding-left: 1.5em;
230 }
231 .citation .label {
232 margin-left: -1.5em;
233 }
234
235 /* Images and Figures */
236 /* Caption to the left (if there is space) or below: */
237 figure {
238 display: flex;
239 flex-wrap: wrap;
240 align-items: flex-start;
241 margin: 0.5em 2%;
242 padding-left: 1em;
243 }
244 figure > img,
245 figure.fullwidth > img {
246 margin: 0 0.5em 0.5em 0;
247 padding: 0;
248 }
249 figcaption {
250 font-size: 0.8em;
251 }
252 .fullwidth > figcaption {
253 font-size: inherit;
254 }
255 figure.numbered > figcaption > p:before {
256 counter-increment: figure;
257 content: "Figure " counter(figure) ": ";
258 }
259
260 /* Tables */
261 table tr {
262 text-align: left;
263 }
264 /* th { vertical-align: bottom; } */
265 /* "booktabs" style (no vertical lines) */
266 table.booktabs {
267 border-top: 2px solid;
268 border-bottom: 2px solid;
269 }
270 table.booktabs * {
271 border: 0;
272 }
273 table.booktabs th {
274 border-bottom: thin solid;
275 }
276 table.numbered > caption:before {
277 counter-increment: table;
278 content: "Table " counter(table) ": ";
279 }
280
281 /* Admonitions and System Messages */
282 .admonition, .system-message {
283 border-style: solid;
284 border-color: silver;
285 border-width: thin;
286 margin: 1em 0;
287 padding: 0.5em;
288 }
289 .caution p.admonition-title,
290 .attention p.admonition-title,
291 .danger p.admonition-title,
292 .warning p.admonition-title,
293 div.error {
294 color: maroon;
295 }
296
297 /* Literal and Code */
298 pre.literal-block, pre.doctest-block,
299 pre.math, pre.code {
300 /* font-family: Consolas, "Liberation Mono", Menlo, monospace; */
301 /* font-size: 0.9em; */
302 overflow: auto;
303 }
304 /* basic highlighting: for a complete scheme, see */
305 /* https://docutils.sourceforge.io/sandbox/stylesheets/ */
306 pre.code .comment, code .comment { color: #5C6576 }
307 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
308 pre.code .literal.string, code .literal.string { color: #0C5404 }
309 pre.code .name.builtin, code .name.builtin { color: #352B84 }
310 pre.code .deleted, code .deleted { background-color: #DEB0A1}
311 pre.code .inserted, code .inserted { background-color: #A3D289}
312
313 .sans {
314 font-family: "Gill Sans", "Gill Sans MT", Calibri, "Lucida Sans", "Noto Sans", sans-serif;
315 letter-spacing: .02em;
316 }
317
318 /* Hyperlink References */
319 /* underline that clears descenders */
320 a {
321 color: inherit;
322 }
323 a:link {
324 text-decoration: underline;
325 /* text-decoration-skip-ink: auto; nonstandard selector */
326 }
327 /* undecorated links */
328 .contents a:link, a.toc-backref:link, a.image-reference:link,
329 a[role="doc-noteref"]:link, a[role="doc-backlink"]:link, .backrefs a:link,
330 a.citation-reference:link,
331 a[href^="#system-message"] {
332 text-decoration: none;
333 }
334 a:link:hover {
335 text-decoration: underline;
336 }
337
338 /* Block Alignment */
339 /* Let content flow to the side of aligned images and figures */
340 /* (does not work if the image/figure is a grid element). */
341
342 /* no floats around this elements */
343 footer, header,
344 hr.docutils,
345 h1, h2, h3, .contents > p.topic-title,
346 .fullwidth {
347 clear: both;
348 }
349
350 img.align-left,
351 svg.align-left,
352 video.align-left,
353 figure.align-left,
354 div.align-left,
355 table.align-left {
356 margin-left: 0;
357 padding-left: 0;
358 padding-right: 0.5em;
359 clear: left;
360 float: left;
361 }
362 figure.align-left > img {
363 margin-left: 0;
364 padding-left: 0;
365 }
366
367 img.align-right,
368 svg.align-right,
369 video.align-right,
370 div.align-right {
371 padding-left: 0.5em;
372 clear: right;
373 float: right;
374 }
375 figure.align-right {
376 clear: right;
377 float: right;
378 }
379 figure.align-right > img {
380 justify-self: right;
381 padding: 0;
382 }
383 table.align-right {
384 margin-right: 2.5%;
385 }
386
387 figure.align-center {
388 align-content: center;
389 justify-content: center;
390 }
391 figure.align-center > img {
392 padding-left: 0;
393 justify-self: center;
394 }
395
396 /* Margin Elements */
397 /* see below for screen size dependent rules */
398 aside.sidebar,
399 .marginal,
400 .admonition.marginal,
401 .topic.marginal {
402 background-color: #efefea;
403 box-sizing: border-box;
404 margin-left: 2%;
405 margin-right: 0;
406 padding: 0.5em;
407 font-size: 0.8em;
408 }
409 aside.sidebar {
410 background-color: inherit;
411 }
412 figure.marginal > figcaption {
413 font-size: 1em;
414 }
415 .footnote {
416 font-size: smaller;
417 overflow: auto;
418 }
419
420 /* Adaptive page layout */
421
422 /* no floating for very small Screens */
423 /* (main text up to ca. 40 characters/line) */
424 @media (min-width: 35em) {
425 main, header, footer {
426 padding: 0.5em calc(15% - 3rem);
427 line-height: 1.6
428 }
429 aside.sidebar,
430 .marginal,
431 .admonition.marginal,
432 .topic.marginal {
433 max-width: 45%;
434 float: right;
435 clear: right;
436 }
437 dl.field-list > dd,
438 dl.docinfo > dd {
439 margin-left: 6em;
440 }
441 dl.option-list > dd {
442 margin-left: 6em;
443 }
444 }
445
446 /* 2 column layout with wide margin */
447 @media (min-width: 65em) {
448 /* use the same grid for main, all sections, and figures */
449 main, section {
450 display: grid;
451 grid-template-columns: [content] minmax(0, 6fr)
452 [margin] 3fr [end];
453 grid-column-gap: calc(3em + 1%);
454 }
455 main > section, section > section {
456 grid-column: 1 / end;
457 }
458 main, header, footer {
459 padding-right: 5%; /* less padding right of margin-column */
460 }
461 section > figure {
462 display: contents; /* to place caption in the margin */
463 }
464 /* Main text elements */
465 main > *, section > *,
466 figure > img,
467 .footnote.align-left, /* override the placement in the margin */
468 .citation.align-left {
469 grid-column: content;
470 }
471 .citation.align-left {
472 font-size: 1em;
473 padding-left: 1.5em;
474 }
475 .citation.align-left .label {
476 margin-left: -1.5em;
477 }
478 figure > img { /* indent */
479 margin: 0.5em 2%;
480 padding-left: 1em;
481 }
482
483 /* Margin Elements */
484 /* Sidebar, Footnotes, Citations, Captions */
485 aside.sidebar,
486 .citation,
487 .footnote,
488 figcaption,
489 /* table > caption, does not work :(*/
490 .marginal,
491 .admonition.marginal,
492 .topic.marginal {
493 /* color: red; */
494 grid-column: margin;
495 width: auto;
496 max-width: 55em;
497 margin: 0.5em 0;
498 border: none;
499 padding: 0;
500 font-size: 0.8em;
501 text-align: initial; /* overwrite align-* */
502 background-color: inherit;
503 }
504 .admonition.marginal {
505 padding: 0.5em;
506 }
507 figure.marginal {
508 display: block;
509 margin: 0.5em 0;
510 }
511 .citation,
512 .footnote {
513 padding-left: 0;
514 }
515 .citation .label,
516 .footnote .label {
517 margin-left: 0;
518 }
519
520 /* Fullwidth Elements */
521 h1.title, p.subtitle,
522 dl.docinfo,
523 div.abstract,
524 div.dedication,
525 nav.contents,
526 aside.system-message,
527 pre,
528 .fullwidth,
529 .fullwidth img,
530 .fullwidth figcaption {
531 /* background-color: Linen; */
532 grid-column: content / end;
533 margin-right: calc(10% - 3rem);
534 max-width: 55em;
535 }
536 }
537
538 /* 3 column layout */
539
540 @media (min-width: 100em) {
541 main, header, footer {
542 padding-left: 30%;
543 }
544 main > nav.contents {
545 position: fixed;
546 top: 0;
547 left: 0;
548 box-sizing: border-box;
549 width: 25%;
550 height: 100vh;
551 margin: 0;
552 background-color: #fafaf6;
553 padding: 5.5em 2%;
554 overflow: auto;
555 }
556 main > nav.contents > * {
557 padding-left: 0;
558 }
559 }
560
561 /* wrap URLs */
562 /* a:link { */
563 /* white-space: normal; */
564 /* hyphens: none; */
565 /* } */