Separate style sheets for required and optional layout rules.
[docutils.git] / docutils / writers / html_base / minimal.css
blobdf86a61991297ac4a270eb659fc9290c3c53d678
1 /* Minimal 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 */
17 /* This CSS2.1_ stylesheet defines rules for Docutils elements without */
18 /* HTML equivalent. It is required to make the document semantic visible. */
19 /* */
20 /* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
21 /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
23 /* Figure/table alignment */
24 .align-left { text-align: left; }
25 .align-right { text-align: right; }
26 .align-center { clear: both; text-align: center;}
28 /* titles */
29 h1.title, p.subtitle {
30 text-align: center;
32 p.admonition-title,
33 p.topic-title,
34 p.sidebar-title,
35 p.rubric,
36 p.system-message-title {
37 font-weight: bold;
39 h1 + p.subtitle,
40 h1 + p.section-subtitle {
41 font-size: 1.6em;
43 h2 + p.section-subtitle { font-size: 1.28em; }
44 p.subtitle,
45 p.section-subtitle,
46 p.sidebar-subtitle {
47 font-weight: bold;
48 margin-top: -0.5em;
50 p.sidebar-title,
51 p.rubric {
52 font-size: larger;
54 p.rubric { color: maroon; }
55 a.toc-backref {
56 color: black;
57 text-decoration: none; }
59 /* Warnings, Errors */
60 div.caution p.admonition-title,
61 div.attention p.admonition-title,
62 div.danger p.admonition-title,
63 div.error p.admonition-title,
64 div.warning p.admonition-title,
65 div.system-messages h1,
66 div.error,
67 span.problematic,
68 p.system-message-title {
69 color: red;
72 /* inline literals */
73 span.docutils.literal {
74 font-family: monospace;
75 white-space: pre-wrap;
77 /* do not wraph at hyphens and similar: */
78 .literal > span.pre { white-space: nowrap; }
80 /* Lists */
82 /* compact and simple lists: no margin between items */
83 .simple li, .compact li,
84 .simple ul, .compact ul,
85 .simple ol, .compact ol,
86 .simple > li p, .compact > li p,
87 dl.simple > dd, dl.compact > dd {
88 margin-top: 0;
89 margin-bottom: 0;
92 /* Table of Contents */
93 div.topic.contents { margin: 0; }
94 ul.auto-toc {
95 list-style-type: none;
96 padding-left: 1.5em; }
98 /* Enumerated Lists */
99 ol.arabic { list-style: decimal }
100 ol.loweralpha { list-style: lower-alpha }
101 ol.upperalpha { list-style: upper-alpha }
102 ol.lowerroman { list-style: lower-roman }
103 ol.upperroman { list-style: upper-roman }
105 dt span.classifier { font-style: italic }
106 dt span.classifier:before {
107 font-style: normal;
108 margin: 0.5em;
109 content: ":";
112 /* Field Lists and drivatives */
113 /* bold field name, content starts on the same line */
114 dl.field-list > dt,
115 dl.option-list > dt,
116 dl.docinfo > dt,
117 dl.footnote > dt,
118 dl.citation > dt {
119 font-weight: bold;
120 clear: left;
121 float: left;
122 margin: 0;
123 padding: 0;
124 padding-right: 0.5em;
126 /* Offset for field content (corresponds to the --field-name-limit option) */
127 dl.field-list > dd,
128 dl.option-list > dd,
129 dl.docinfo > dd {
130 margin-left: 9em; /* ca. 14 chars in the test examples */
132 /* start field-body on a new line after long field names */
133 dl.field-list > dd > *:first-child,
134 dl.option-list > dd > *:first-child
136 display: inline-block;
137 width: 100%;
138 margin: 0;
140 /* field names followed by a colon */
141 dl.field-list > dt:after,
142 dl.docinfo > dt:after {
143 content: ":";
146 /* Bibliographic Fields (docinfo) */
147 pre.address { font: inherit; }
148 dd.authors > p { margin: 0; }
150 /* Option Lists */
151 dl.option-list { margin-left: 40px; }
152 dl.option-list > dt { font-weight: normal; }
153 span.option { white-space: nowrap; }
155 /* Footnotes and Citations */
156 dl > dt.label { font-weight: normal; }
157 dt.label > span.fn-backref { margin: 0.2em; }
158 dt.label > span.fn-backref > a { font-style: italic; }
160 /* Line Blocks */
161 div.line-block { display: block; }
162 div.line-block div.line-block {
163 margin-top: 0;
164 margin-bottom: 0;
165 margin-left: 40px;
168 /* Images and Figures */
169 img.align-left,
170 .figure.align-left,
171 object.align-left {
172 display: block;
173 margin-right: auto;
175 img.align-center,
176 .figure.align-center,
177 object.align-center {
178 display: block;
179 margin-left: auto;
180 margin-right: auto;
182 img.align-right,
183 .figure.align-right,
184 object.align-right {
185 display: block;
186 margin-left: auto;
188 /* reset inner alignment in figures */
189 div.align-right { text-align: inherit }
191 /* Admonitions and System Messages */
192 div.admonition,
193 div.system-message,
194 div.sidebar{
195 margin: 40px;
196 border: medium outset;
197 padding-right: 1em;
198 padding-left: 1em;
201 /* Sidebar */
202 div.sidebar {
203 width: 30%;
204 max-width: 26em;
205 float: right;
206 clear: right;
209 /* Text Blocks */
210 div.topic,
211 pre.literal-block,
212 pre.doctest-block,
213 pre.math,
214 pre.code {
215 margin-right: 40px;
216 margin-left: 40px;
218 pre.code .ln { color: gray; } /* line numbers */
220 /* Tables */
221 table { border-collapse: collapse; }
222 td, th {
223 border-style: solid;
224 border-color: silver;
225 padding: 0 1ex;
226 border-width: thin;
228 td > p:first-child, th > p:first-child { margin-top: 0; }
229 td > p, th > p { margin-bottom: 0; }
231 table > caption {
232 text-align: left;
233 margin-bottom: 0.25em
236 table.borderless td, table.borderless th {
237 border: 0;
238 padding: 0;
239 padding-right: 0.5em /* separate table cells */