Apply [ 125 ] respect automatic table column sizing also in html4css1.
[docutils.git] / docutils / docutils / writers / html5_polyglot / plain.css
blob0d05cdd9361308d8be2849c6fdd6ed9c48b3e00c
1 /* CSS31_ style sheet for the output of Docutils HTML writers. */
2 /* Rules for easy reading and pre-defined style variants. */
3 /* */
4 /* :Author: Günter Milde, based on html4css1.css by David Goodger */
5 /* :Id: $Id$ */
6 /* :Copyright: © 2015 Günter Milde. */
7 /* :License: Released under the terms of the `2-Clause BSD license`_, */
8 /* in short: */
9 /* */
10 /* Copying and distribution of this file, with or without modification, */
11 /* are permitted in any medium without royalty provided the copyright */
12 /* notice and this notice are preserved. */
13 /* */
14 /* This file is offered as-is, without any warranty. */
15 /* */
16 /* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
17 /* .. _CSS3: http://www.w3.org/TR/CSS3 */
20 /* Document Structure */
21 /* ****************** */
23 /* "page layout" */
24 body {
25 padding: 0 5%;
26 margin: 8px 0;
28 div.document {
29 line-height:1.3;
30 counter-reset: table;
31 /* counter-reset: figure; */
32 /* avoid long lines --> better reading */
33 /* OTOH: lines should not be too short because of missing hyphenation, */
34 max-width: 50em;
35 margin: auto;
38 /* Sections */
40 /* Transitions */
42 hr.docutils {
43 width: 80%;
44 margin-top: 1em;
45 margin-bottom: 1em;
46 clear: both;
49 /* Paragraphs */
50 /* ========== */
52 /* vertical space (parskip) */
53 p, ol, ul, dl,
54 div.line-block,
55 table{
56 margin-top: 0.5em;
57 margin-bottom: 0.5em;
59 h1, h2, h3, h4, h5, h6,
60 dl > dd {
61 margin-bottom: 0.5em;
64 /* Lists */
65 /* ========== */
67 /* Definition Lists */
69 dl > dd p:first-child { margin-top: 0; }
70 /* :last-child is not part of CSS 2.1 (introduced in CSS 3) */
71 /* dl > dd p:last-child { margin-bottom: 0; } */
73 /* lists nested in definition lists */
74 /* :only-child is not part of CSS 2.1 (introduced in CSS 3) */
75 dd > ul:only-child, dd > ol:only-child { padding-left: 1em; }
77 /* Description Lists */
78 /* styled like in most dictionaries, encyclopedias etc. */
79 dl.description > dt {
80 font-weight: bold;
81 clear: left;
82 float: left;
83 margin: 0;
84 padding: 0;
85 padding-right: 0.5em;
88 /* Field Lists */
90 /* example for custom field-name width */
91 dl.field-list.narrow > dd {
92 margin-left: 5em;
94 /* run-in: start field-body on same line after long field names */
95 dl.field-list.run-in > dd p {
96 display: block;
99 /* Bibliographic Fields */
101 /* generally, bibliographic fields use special definition list dl.docinfo */
102 /* but dedication and abstract are placed into "topic" divs */
103 div.abstract p.topic-title {
104 text-align: center;
106 div.dedication {
107 margin: 2em 5em;
108 text-align: center;
109 font-style: italic;
111 div.dedication p.topic-title {
112 font-style: normal;
115 /* Citations */
116 dl.citation dt.label {
117 font-weight: bold;
119 span.fn-backref {
120 font-weight: normal;
123 /* Text Blocks */
124 /* ============ */
126 /* Literal Blocks */
127 pre.literal-block, pre.doctest-block,
128 pre.math, pre.code {
129 margin-left: 1.5em;
130 margin-right: 1.5em
133 /* Block Quotes */
135 blockquote,
136 div.topic {
137 margin-left: 1.5em;
138 margin-right: 1.5em
140 blockquote > table,
141 div.topic > table {
142 margin-top: 0;
143 margin-bottom: 0;
145 blockquote p.attribution,
146 div.topic p.attribution {
147 text-align: right;
148 margin-left: 20%;
151 /* Tables */
152 /* ====== */
154 /* th { vertical-align: bottom; } */
156 table tr { text-align: left; }
158 /* "booktabs" style (no vertical lines) */
159 table.booktabs {
160 border: 0;
161 border-top: 2px solid;
162 border-bottom: 2px solid;
163 border-collapse: collapse;
165 table.booktabs * {
166 border: 0;
168 table.booktabs th {
169 border-bottom: thin solid;
172 /* numbered tables (counter defined in div.document) */
173 table.numbered > caption:before {
174 counter-increment: table;
175 content: "Table " counter(table) ": ";
176 font-weight: bold;
179 /* Explicit Markup Blocks */
180 /* ====================== */
182 /* Footnotes and Citations */
183 /* ----------------------- */
185 /* line on the left */
186 dl.footnote {
187 padding-left: 1ex;
188 border-left: solid;
189 border-left-width: thin;
192 /* Directives */
193 /* ---------- */
195 /* Body Elements */
196 /* ~~~~~~~~~~~~~ */
198 /* Images and Figures */
200 /* let content flow to the side of aligned images and figures */
201 .figure.align-left,
202 img.align-left,
203 object.align-left {
204 display: block;
205 clear: left;
206 float: left;
207 margin-right: 1em
209 .figure.align-right,
210 img.align-right,
211 object.align-right {
212 display: block;
213 clear: right;
214 float: right;
215 margin-left: 1em
217 /* Stop floating sidebars, images and figures at section level 1,2,3 */
218 h1, h2, h3 { clear: both; }
220 /* Sidebar */
222 /* Move into the margin. In a layout with fixed margins, */
223 /* it can be moved into the margin completely. */
224 div.sidebar {
225 width: 30%;
226 max-width: 26em;
227 margin-left: 1em;
228 margin-right: -5.5%;
229 background-color: #ffffee ;
232 /* Code */
234 pre.code, code { background-color: #eeeeee }
235 pre.code .ln { color: gray; } /* line numbers */
236 /* basic highlighting: for a complete scheme, see */
237 /* http://docutils.sourceforge.net/sandbox/stylesheets/ */
238 pre.code .comment, code .comment { color: #5C6576 }
239 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
240 pre.code .literal.string, code .literal.string { color: #0C5404 }
241 pre.code .name.builtin, code .name.builtin { color: #352B84 }
242 pre.code .deleted, code .deleted { background-color: #DEB0A1}
243 pre.code .inserted, code .inserted { background-color: #A3D289}
245 /* Math */
246 /* styled separately (see math.css for math-output=HTML) */
248 /* Epigraph */
249 /* Highlights */
250 /* Pull-Quote */
251 /* Compound Paragraph */
252 /* Container */
254 /* can be styled in a custom stylesheet */
256 /* Document Header and Footer */
258 div.footer, div.header {
259 clear: both;
260 font-size: smaller;
263 /* Inline Markup */
264 /* ============= */
266 /* Emphasis */
267 /* em */
268 /* Strong Emphasis */
269 /* strong */
270 /* Interpreted Text */
271 /* span.interpreted */
272 /* Title Reference */
273 /* cite */
274 /* Inline Literals */
275 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
276 /* span.docutils.literal { white-space: pre-wrap; } */
278 /* Hyperlink References */
279 a { text-decoration: none; }
281 /* External Targets */
282 /* span.target.external */
283 /* Internal Targets */
284 /* span.target.internal */
285 /* Footnote References */
286 /* a.footnote-reference */
287 /* Citation References */
288 /* a.citation-reference */