1 /* Basic style sheet for the HTML output of Docutils. */
3 /* :Author: Günter Milde, based on html4css1.css by David Goodger */
5 /* :Copyright: © 2015 Günter Milde. */
6 /* :License: Released under the terms of the `2-Clause BSD license`_, */
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. */
13 /* This file is offered as-is, without any warranty. */
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_ */
21 /* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
22 /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
25 /* Document Structure */
26 /* ****************** */
38 /* counter-reset: figure; */
39 /* avoid long lines --> better reading */
40 /* OTOH: lines should not be too short because of missing hyphenation, */
45 .align-left { text-align: left
; }
46 .align-right { text-align: right
; }
54 h1
.title
, p
.subtitle
{
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; }
64 text-decoration: none
;
67 /* Stop floating sidebars, images and figures at section level 1,2,3 */
68 h1
, h2
, h3
{ clear: both
; }
82 /* vertical space (parskip) */
89 h1
, h2
, h3
, h4
, h5
, h6
,
98 p
.system-message-title
{
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
,
119 p
.system-message-title
{
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 {
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
{
161 /* bold field name, content starts on the same line */
167 dl
.description
> dt
{
173 padding-right: 0.5em;
175 /* Offset for field content (corresponds to the --field-name-limit option) */
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
;
190 /* field names followed by a colon */
191 dl
.field-list
> dt:after
,
192 dl
.docinfo
> dt:after
{
196 /* example for custom field-name width */
197 dl
.field-list
.narrow
> dd
{
200 /* run-in: start field-body on same line after long field names */
201 dl
.field-list
.run-in
> dd p
{
205 /* Bibliographic Fields */
207 /* use special field-list dl.docinfo */
214 dd
.authors
> p
{ margin: 0; }
216 div
.abstract p
.topic-title
{
225 div
.dedication p
.topic-title
{
234 dl
.option-list
> dt
{
249 div
.line-block div
.line-block
{
257 pre
.literal-block
, pre
.doctest-block
,
275 blockquote p
.attribution
,
276 div
.topic p
.attribution
{
284 /* margins and borders for "normal" tables */
286 border-collapse: collapse
;
290 border-color: silver
;
292 /* some borders missing at some magnifications
293 /* in Firefox 31.5.0 and opera 10.63 */
296 td > p:first-child, th > p:first-child {
303 vertical-align: bottom;
308 margin-bottom: 0.25em
311 table.borderless td, table.borderless th {
314 padding-right: 0.5em /* separate table cells */
317 /* "booktabs" style (no vertical lines) */
320 border-top: 2px solid;
321 border-bottom: 2px solid;
322 border-collapse: collapse;
329 border-bottom: thin solid;
333 /* numbered tables (counter defined in div.document) */
334 table.numbered > caption:before {
335 counter-increment: table;
336 content: "Table " counter(table) ": ";
340 /* Explicit Markup Blocks */
341 /* ====================== */
343 /* Footnotes and Citations */
344 /* ----------------------- */
346 /* line on the left */
350 border-left-width: thin;
356 dt.label > span.fn-backref {
359 dt.label > span.fn-backref > a {
367 /* System Messages */
372 border: medium outset;
380 /* Image and Figure */
397 .figure.align-center,
398 object.align-center {
403 /* reset inner alignment in figures */
405 text-align: inherit }
409 div.topic { margin: 2em }
413 /* in a layout with fixed margins, */
414 /* the sidebar can be moved into the margin completely */
416 border: medium outset;
425 background-color: #ffffee ;
427 p.sidebar-title { font-size: larger; }
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}
443 /* styled separately (see math.css for math-output=HTML) */
456 /* Compound Paragraph */
459 /* can be styled in a custom stylesheet */
461 /* Document Header & Footer */
463 div.footer, div.header {
471 margin: 0; /* don't indent like a topic */
474 list-style-type: none;
482 /* Strong Emphasis */
484 /* Interpreted Text */
485 /* span.interpreted */
486 /* Title Reference */
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 */