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 /* :only-child is not part of CSS 2.1 (introduced in CSS 3) */
151 dd
> ul:only-child
, dd
> ol:only-child
{ padding-left: 1em; }
153 dt span
.classifier
{ font-style: italic
}
154 dt span
.classifier:before
{
162 /* bold field name, content starts on the same line */
168 dl
.description
> dt
{
174 padding-right: 0.5em;
176 /* Offset for field content (corresponds to the --field-name-limit option) */
180 margin-left: 9em; /* ca. 14 chars in the test examples */
181 /* padding-left: 0.5em; */
183 /* start field-body on a new line after long field names */
184 dl
.field-list
> dd
> *:first-child
,
185 dl
.option-list
> dd
> *:first-child
,
186 dl
.docinfo
> dd
> *:first-child
{
187 display: inline-block
;
191 /* field names followed by a colon */
192 dl
.field-list
> dt:after
,
193 dl
.docinfo
> dt:after
{
197 /* example for custom field-name width */
198 dl
.field-list
.narrow
> dd
{
201 /* run-in: start field-body on same line after long field names */
202 dl
.field-list
.run-in
> dd p
{
206 /* Bibliographic Fields */
208 /* use special field-list dl.docinfo */
215 dd
.authors
> p
{ margin: 0; }
217 div
.abstract p
.topic-title
{
226 div
.dedication p
.topic-title
{
235 dl
.option-list
> dt
{
250 div
.line-block div
.line-block
{
258 pre
.literal-block
, pre
.doctest-block
,
276 blockquote p
.attribution
,
277 div
.topic p
.attribution
{
285 /* margins and borders for "normal" tables */
287 border-collapse: collapse
;
291 border-color: silver
;
293 /* some borders missing at some magnifications
294 /* in Firefox 31.5.0 and opera 10.63 */
297 td > p:first-child, th > p:first-child {
304 vertical-align: bottom;
309 margin-bottom: 0.25em
312 table.borderless td, table.borderless th {
315 padding-right: 0.5em /* separate table cells */
318 /* "booktabs" style (no vertical lines) */
321 border-top: 2px solid;
322 border-bottom: 2px solid;
323 border-collapse: collapse;
330 border-bottom: thin solid;
334 /* numbered tables (counter defined in div.document) */
335 table.numbered > caption:before {
336 counter-increment: table;
337 content: "Table " counter(table) ": ";
341 /* Explicit Markup Blocks */
342 /* ====================== */
344 /* Footnotes and Citations */
345 /* ----------------------- */
347 /* line on the left */
351 border-left-width: thin;
357 dt.label > span.fn-backref {
360 dt.label > span.fn-backref > a {
368 /* System Messages */
373 border: medium outset;
381 /* Image and Figure */
398 .figure.align-center,
399 object.align-center {
404 /* reset inner alignment in figures */
406 text-align: inherit }
410 div.topic { margin: 2em }
414 /* in a layout with fixed margins, */
415 /* the sidebar can be moved into the margin completely */
417 border: medium outset;
426 background-color: #ffffee ;
428 p.sidebar-title { font-size: larger; }
432 pre.code, code { background-color: #eeeeee }
433 pre.code .ln { color: gray; } /* line numbers */
434 /* basic highlighting: for a complete scheme, see */
435 /* http://docutils.sourceforge.net/sandbox/stylesheets/ */
436 pre.code .comment, code .comment { color: #5C6576 }
437 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
438 pre.code .literal.string, code .literal.string { color: #0C5404 }
439 pre.code .name.builtin, code .name.builtin { color: #352B84 }
440 pre.code .deleted, code .deleted { background-color: #DEB0A1}
441 pre.code .inserted, code .inserted { background-color: #A3D289}
444 /* styled separately (see math.css for math-output=HTML) */
457 /* Compound Paragraph */
460 /* can be styled in a custom stylesheet */
462 /* Document Header and Footer */
464 div.footer, div.header {
472 margin: 0; /* don't indent like a topic */
475 list-style-type: none;
483 /* Strong Emphasis */
485 /* Interpreted Text */
486 /* span.interpreted */
487 /* Title Reference */
489 /* Inline Literals */
491 tt.literal, span.docutils.literal {
492 font-family: monospace;
493 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
494 white-space: pre-wrap;
496 /* do not wraph a hyphens and similar: */
497 .literal > span.pre { white-space: nowrap; }
499 /* Hyperlink References */
501 a { text-decoration: none; }
503 /* External Targets */
504 /* span.target.external */
505 /* Internal Targets */
506 /* span.target.internal */
507 /* Footnote References */
508 /* a.footnote-reference */
509 /* Citation References */
510 /* a.citation-reference */