Website: add template and basic stylesheet with menu. Update buildhtml.py (and theref...
[docutils.git] / sandbox / gitpull / web_stylesheet_and_menu / docutils / writers / html_base / html-base.css
blobee5e2e4a3008eb33a5fc38106bae009d2fc5c564
1 /* Basic style sheet for the HTML output of Docutils. */
2 /* */
3 /* :Author: Günter Milde, based on html4css1.css by David Goodger */
4 /* :Id: $Id$ */
5 /* :Copyright: © 2015 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 */
18 /* This stylesheet contains basic rules for the output of the */
19 /* Docutils HTML writers. It validates_ as CSS2.1_ */
20 /* */
21 /* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
22 /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
25 /* Document Structure */
26 /* ****************** */
28 /* Document */
30 body {
31 padding: 0 5%;
32 margin: 8px 0;
35 div.document {
36 line-height:1.3;
37 counter-reset: table;
38 /* counter-reset: figure; */
39 /* avoid long lines --> better reading */
40 /* OTOH: lines should not be too short because of missing hyphenation, */
41 max-width: 50em;
42 margin: auto;
45 .align-left { text-align: left; }
46 .align-right { text-align: right; }
47 .align-center {
48 clear: both;
49 text-align: center;
52 /* Sections */
54 h1.title, p.subtitle {
55 text-align: center;
58 h1 + p.subtitle { font-size: 1.6em; }
59 h1 + p.section-subtitle { font-size: 1.6em; }
60 h2 + p.section-subtitle { font-size: 1.28em; }
62 a.toc-backref {
63 color: black;
64 text-decoration: none;
67 /* Stop floating sidebars, images and figures at section level 1,2,3 */
68 h1, h2, h3 { clear: both; }
70 /* Transitions */
72 hr.docutils {
73 width: 80%;
74 margin-top: 1em;
75 margin-bottom: 1em;
76 clear: both;
79 /* Paragraphs */
80 /* ========== */
82 /* vertical space (parskip) */
83 p, ol, ul, dl,
84 div.line-block,
85 table{
86 margin-top: 0.5em;
87 margin-bottom: 0.5em;
89 h1, h2, h3, h4, h5, h6,
90 dl > dd {
91 margin-bottom: 0.5em;
94 /* titles */
95 p.admonition-title,
96 p.topic-title,
97 p.sidebar-title,
98 p.system-message-title {
99 font-weight: bold;
102 p.subtitle,
103 p.section-subtitle,
104 p.sidebar-subtitle {
105 font-weight: bold;
106 margin-top: -0.5em;
110 /* Warnings, Errors */
111 div.caution p.admonition-title,
112 div.attention p.admonition-title,
113 div.danger p.admonition-title,
114 div.error p.admonition-title,
115 div.warning p.admonition-title,
116 div.system-messages h1,
117 div.error,
118 span.problematic,
119 p.system-message-title {
120 color: red;
123 /* Lists */
124 /* ========== */
126 /* compact and simple lists: no margin between items */
127 dl.simple > dd, dl.compact > dd,
128 .compact li, .compact ul, .compact ol
129 .simple li, .simple ul, .simple ol,
130 .simple > li p, .compact > li p {
131 margin-top: 0;
132 margin-bottom: 0;
135 /* Enumerated Lists */
137 ol.arabic { list-style: decimal }
138 ol.loweralpha { list-style: lower-alpha }
139 ol.upperalpha { list-style: upper-alpha }
140 ol.lowerroman { list-style: lower-roman }
141 ol.upperroman { list-style: upper-roman }
143 /* Definition Lists */
145 dl > dd p:first-child { margin-top: 0; }
146 /* :last-child is not part of CSS 2.1 (introduced in CSS 3) */
147 /* dl > dd p:last-child { margin-bottom: 0; } */
149 /* lists nested in definition lists */
150 dd > ul, dd > ol { padding-left: 0pt; }
152 dt span.classifier { font-style: italic }
153 dt span.classifier:before {
154 font-style: normal;
155 margin: 0.5em;
156 content: ":";
159 /* Field Lists */
161 /* bold field name, content starts on the same line */
162 dl.field-list > dt,
163 dl.option-list > dt,
164 dl.docinfo > dt,
165 dl.footnote > dt,
166 dl.citation > dt,
167 dl.description > dt {
168 font-weight: bold;
169 clear: left;
170 float: left;
171 margin: 0;
172 padding: 0;
173 padding-right: 0.5em;
175 /* Offset for field content (corresponds to the --field-name-limit option) */
176 dl.field-list > dd,
177 dl.option-list > dd,
178 dl.docinfo > dd {
179 margin-left: 9em; /* ca. 14 chars in the test examples */
180 /* padding-left: 0.5em; */
182 /* start field-body on a new line after long field names */
183 dl.field-list > dd > *:first-child,
184 dl.option-list > dd > *:first-child,
185 dl.docinfo > dd > *:first-child {
186 display: inline-block;
187 width: 100%;
188 margin: 0;
190 /* field names followed by a colon */
191 dl.field-list > dt:after,
192 dl.docinfo > dt:after {
193 content: ":";
196 /* example for custom field-name width */
197 dl.field-list.narrow > dd {
198 margin-left: 5em;
200 /* run-in: start field-body on same line after long field names */
201 dl.field-list.run-in > dd p {
202 display: block;
205 /* Bibliographic Fields */
207 /* use special field-list dl.docinfo */
209 pre.address {
210 margin-bottom: 0;
211 margin-top: 0;
212 font: inherit;
214 dd.authors > p { margin: 0; }
216 div.abstract p.topic-title {
217 text-align: center;
220 div.dedication {
221 margin: 2em 5em;
222 text-align: center;
223 font-style: italic;
225 div.dedication p.topic-title {
226 font-style: normal;
229 /* Option Lists */
231 dl.option-list {
232 margin-left: 1em;
234 dl.option-list > dt {
235 font-weight: normal;
237 span.option {
238 white-space: nowrap;
241 /* Text Blocks */
242 /* ============ */
244 /* Line Blocks */
246 div.line-block {
247 display: block;
249 div.line-block div.line-block {
250 margin-top: 0;
251 margin-bottom: 0;
252 margin-left: 1.5em;
255 /* Literal Blocks */
257 pre.literal-block, pre.doctest-block,
258 pre.math, pre.code {
259 margin-left: 1.5em;
260 margin-right: 1.5em
263 /* Block Quotes */
265 blockquote,
266 div.topic {
267 margin-left: 1.5em;
268 margin-right: 1.5em
270 blockquote > table,
271 div.topic > table {
272 margin-top: 0;
273 margin-bottom: 0;
275 blockquote p.attribution,
276 div.topic p.attribution {
277 text-align: right;
278 margin-left: 20%;
281 /* Tables */
282 /* ====== */
284 /* margins and borders for "normal" tables */
285 table {
286 border-collapse: collapse;
288 td, th {
289 border-style: solid;
290 border-color: silver;
291 padding: 0 1ex;
292 /* some borders missing at some magnifications
293 /* in Firefox 31.5.0 and opera 10.63 */
294 border-width: thin;
296 td > p:first-child, th > p:first-child {
297 margin-top: 0;
299 td > p, th > p {
300 margin-bottom: 0;
302 th {
303 vertical-align: bottom;
306 table > caption {
307 text-align: left;
308 margin-bottom: 0.25em
311 table.borderless td, table.borderless th {
312 border: 0;
313 padding: 0;
314 padding-right: 0.5em /* separate table cells */
317 /* "booktabs" style (no vertical lines) */
318 table.booktabs {
319 border: 0;
320 border-top: 2px solid;
321 border-bottom: 2px solid;
322 border-collapse: collapse;
325 table.booktabs * {
326 border: 0;
328 table.booktabs th {
329 border-bottom: thin solid;
330 text-align: left;
333 /* numbered tables (counter defined in div.document) */
334 table.numbered > caption:before {
335 counter-increment: table;
336 content: "Table " counter(table) ": ";
337 font-weight: bold;
340 /* Explicit Markup Blocks */
341 /* ====================== */
343 /* Footnotes and Citations */
344 /* ----------------------- */
346 /* line on the left */
347 dl.footnote {
348 padding-left: 1ex;
349 border-left: solid;
350 border-left-width: thin;
353 dl > dt.label {
354 font-weight: normal;
356 dt.label > span.fn-backref {
357 margin: 0.2em;
359 dt.label > span.fn-backref > a {
360 font-style: italic;
363 /* Directives */
364 /* ---------- */
366 /* Admonitions */
367 /* System Messages */
369 div.admonition,
370 div.system-message {
371 margin: 2em;
372 border: medium outset;
373 padding-right: 1em;
374 padding-left: 1em;
377 /* Body Elements */
378 /* ~~~~~~~~~~~~~ */
380 /* Image and Figure */
382 img.align-left,
383 .figure.align-left,
384 object.align-left {
385 clear: left;
386 float: left;
387 margin-right: 1em
389 img.align-right,
390 .figure.align-right,
391 object.align-right {
392 clear: right;
393 float: right;
394 margin-left: 1em
396 img.align-center,
397 .figure.align-center,
398 object.align-center {
399 display: block;
400 margin-left: auto;
401 margin-right: auto;
403 /* reset inner alignment in figures */
404 div.align-right {
405 text-align: inherit }
407 /* Topic */
409 div.topic { margin: 2em }
411 /* Sidebar */
413 /* in a layout with fixed margins, */
414 /* the sidebar can be moved into the margin completely */
415 div.sidebar {
416 border: medium outset;
417 padding-right: 1em;
418 padding-left: 1em;
419 width: 30%;
420 max-width: 26em;
421 float: right;
422 clear: right;
423 margin-left: 1em;
424 margin-right: -5.5%;
425 background-color: #ffffee ;
427 p.sidebar-title { font-size: larger; }
429 /* Code */
431 pre.code, code { background-color: #eeeeee }
432 pre.code .ln { color: gray; } /* line numbers */
433 /* basic highlighting: for a complete scheme, see */
434 /* http://docutils.sourceforge.net/sandbox/stylesheets/ */
435 pre.code .comment, code .comment { color: #5C6576 }
436 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
437 pre.code .literal.string, code .literal.string { color: #0C5404 }
438 pre.code .name.builtin, code .name.builtin { color: #352B84 }
439 pre.code .deleted, code .deleted { background-color: #DEB0A1}
440 pre.code .inserted, code .inserted { background-color: #A3D289}
442 /* Math */
443 /* styled separately (see math.css for math-output=HTML) */
445 /* Rubric */
447 p.rubric {
448 font-weight: bold;
449 font-size: larger;
450 color: maroon;
453 /* Epigraph */
454 /* Highlights */
455 /* Pull-Quote */
456 /* Compound Paragraph */
457 /* Container */
459 /* can be styled in a custom stylesheet */
461 /* Document Header & Footer */
463 div.footer, div.header {
464 clear: both;
465 font-size: smaller;
468 /* Contents */
470 div.topic.contents {
471 margin: 0; /* don't indent like a topic */
473 ul.auto-toc {
474 list-style-type: none;
477 /* Inline Markup */
478 /* ============= */
480 /* Emphasis */
481 /* em */
482 /* Strong Emphasis */
483 /* strong */
484 /* Interpreted Text */
485 /* span.interpreted */
486 /* Title Reference */
487 /* cite */
488 /* Inline Literals */
490 tt.literal, span.docutils.literal {
491 font-family: monospace;
492 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
493 white-space: pre-wrap;
495 /* do not wraph a hyphens and similar: */
496 .literal > span.pre { white-space: nowrap; }
498 /* Hyperlink References */
500 a { text-decoration: none; }
502 /* External Targets */
503 /* span.target.external */
504 /* Internal Targets */
505 /* span.target.internal */
506 /* Footnote References */
507 /* a.footnote-reference */
508 /* Citation References */
509 /* a.citation-reference */