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.5em; }
59 h1
+ p
.section-subtitle
{ font-size: 1.5em; }
60 h2
+ p
.section-subtitle
{ font-size: 1.17em; }
64 text-decoration: none
;
67 /* Stop floating sidebars, images and figures at section level 1,2,3 */
68 h1
, h2
, h3
{ clear: both
; }
81 /* vertical space (parskip) */
88 h1
, h2
, h3
, h4
, h5
, h6
,
97 p
.system-message-title
{
109 /* Warnings, Errors */
110 div
.caution p
.admonition-title
,
111 div
.attention p
.admonition-title
,
112 div
.danger p
.admonition-title
,
113 div
.error p
.admonition-title
,
114 div
.warning p
.admonition-title
,
115 div
.system-messages h1
,
118 p
.system-message-title
{
125 /* compact and simple lists: no margin between items */
126 dl
.simple
> dd
, dl
.compact
> dd
,
127 .compact li
, .compact ul
, .compact ol
128 .simple li
, .simple ul
, .simple ol
,
129 .simple > li p, .compact > li p {
134 /* Enumerated Lists */
136 ol
.arabic
{ list-style: decimal
}
137 ol
.loweralpha
{ list-style: lower-alpha
}
138 ol
.upperalpha
{ list-style: upper-alpha
}
139 ol
.lowerroman
{ list-style: lower-roman
}
140 ol
.upperroman
{ list-style: upper-roman
}
142 /* Definition Lists */
144 dl
> dd
p:first-child
{ margin-top: 0; }
145 /* :last-child is not part of CSS 2.1 (introduced in CSS 3) */
146 /* dl > dd p:last-child { margin-bottom: 0; } */
148 /* lists nested in definition lists */
149 dd
> ul
, dd
> ol
{ padding-left: 0pt; }
151 dt span
.classifier
{ font-style: italic
}
152 dt span
.classifier:before
{
160 /* bold field name, content starts on the same line */
166 dl
.description
> dt
{
172 padding-right: 0.5em;
174 /* Offset for field content (corresponds to the --field-name-limit option) */
178 margin-left: 9em; /* ca. 14 chars in the test examples */
179 /* padding-left: 0.5em; */
181 /* start field-body on a new line after long field names */
182 dl
.field-list
> dd
> *:first-child
,
183 dl
.option-list
> dd
> *:first-child
,
184 dl
.docinfo
> dd
> *:first-child
{
185 display: inline-block
;
189 /* field names followed by a colon */
190 dl
.field-list
> dt:after
,
191 dl
.docinfo
> dt:after
{
195 /* example for custom field-name width */
196 dl
.field-list
.narrow
> dd
{
199 /* run-in: start field-body on same line after long field names */
200 dl
.field-list
.run-in
> dd p
{
204 /* Bibliographic Fields */
206 /* use special field-list dl.docinfo */
213 dd
.authors
> p
{ margin: 0; }
215 div
.abstract p
.topic-title
{
224 div
.dedication p
.topic-title
{
233 dl
.option-list
> dt
{
248 div
.line-block div
.line-block
{
256 pre
.literal-block
, pre
.doctest-block
,
274 blockquote p
.attribution
,
275 div
.topic p
.attribution
{
283 /* margins and borders for "normal" tables */
285 border-collapse: collapse
;
289 border-color: silver
;
291 /* some borders missing at some magnifications
292 /* in Firefox 31.5.0 and opera 10.63 */
295 td > p:first-child, th > p:first-child {
302 vertical-align: bottom;
307 margin-bottom: 0.25em
310 table.borderless td, table.borderless th {
313 padding-right: 0.5em /* separate table cells */
316 /* "booktabs" style (no vertical lines) */
319 border-top: 2px solid;
320 border-bottom: 2px solid;
321 border-collapse: collapse;
328 border-bottom: thin solid;
332 /* numbered tables (counter defined in div.document) */
333 table.numbered > caption:before {
334 counter-increment: table;
335 content: "Table " counter(table) ": ";
339 /* Explicit Markup Blocks */
340 /* ====================== */
342 /* Footnotes and Citations */
343 /* ----------------------- */
345 /* line on the left */
349 border-left-width: thin;
355 dt.label > span.fn-backref {
358 dt.label > span.fn-backref > a {
366 /* System Messages */
371 border: medium outset;
379 /* Image and Figure */
396 .figure.align-center,
397 object.align-center {
402 /* reset inner alignment in figures */
404 text-align: inherit }
408 div.topic { margin: 2em }
412 /* in a layout with fixed margins, */
413 /* the sidebar can be moved into the margin completely */
415 border: medium outset;
424 background-color: #ffffee ;
426 p.sidebar-title { font-size: larger; }
430 pre.code, code { background-color: #eeeeee }
431 pre.code .ln { color: gray; } /* line numbers */
432 /* basic highlighting: for a complete scheme, see */
433 /* http://docutils.sourceforge.net/sandbox/stylesheets/ */
434 pre.code .comment, code .comment { color: #5C6576 }
435 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
436 pre.code .literal.string, code .literal.string { color: #0C5404 }
437 pre.code .name.builtin, code .name.builtin { color: #352B84 }
438 pre.code .deleted, code .deleted { background-color: #DEB0A1}
439 pre.code .inserted, code .inserted { background-color: #A3D289}
442 /* styled separately (see math.css for math-output=HTML) */
455 /* Compound Paragraph */
458 /* can be styled in a custom stylesheet */
460 /* Document Header & Footer */
462 div.footer, div.header {
470 margin: 0; /* don't indent like a topic */
473 list-style-type: none;
481 /* Strong Emphasis */
483 /* Interpreted Text */
484 /* span.interpreted */
485 /* Title Reference */
487 /* Inline Literals */
489 tt.literal, span.docutils.literal {
490 font-family: monospace;
491 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
492 white-space: pre-wrap;
494 /* do not wraph a hyphens and similar: */
495 .literal > span.pre { white-space: nowrap; }
497 /* Hyperlink References */
499 a { text-decoration: none; }
501 /* External Targets */
502 /* span.target.external */
503 /* Internal Targets */
504 /* span.target.internal */
505 /* Footnote References */
506 /* a.footnote-reference */
507 /* Citation References */
508 /* a.citation-reference */