1 /* xhtml11.css: Cascading style sheet for Docutils' xhtml11 writer. */
3 /* :Author: Günter Milde */
4 /* :Copyright: © 2009, 2014 Günter Milde. */
5 /* :License: Released under the terms of the `2-Clause BSD license`_, */
8 /* Copying and distribution of this file, with or without modification, */
9 /* are permitted in any medium without royalty provided the copyright */
10 /* notice and this notice are preserved. */
11 /* This file is offered as-is, without any warranty. */
13 /* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
15 /* This stylesheet contains rules specific to the output of the */
16 /* XHTML 1.1 writer. It supplements the "html-base.css" stylesheet. */
17 /* It validates_ as CSS2.1_ */
19 /* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
20 /* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
23 /* Ordered List (Enumeration) */
24 /* -------------------------- */
26 /* XHTML 1.1 removed the "start" argument form ordered lists (It */
27 /* resurfaces in HTML5). */
29 /* Use custom counters to replace the deprecated start attribute. Make */
30 /* sure the resulting list resembles the list-style 'outside' with a */
33 /* New ordered list: reset counter, suppress the default label */
34 ol
, ol
.arabic
, ol
.loweralpha
, ol
.upperalpha
,
35 ol
.lowerroman
, ol
.upperroman
{
40 /* Set the negative indent of the list label as feature of the list item */
42 text-indent: -40px; /* Mozillas default indent */
44 /* reset for child elements */
49 /* background: lightgreen; */
54 /* increment and typeset counter(s), */
55 counter-increment: item
;
56 content: counter
(item
) ".";
57 /* display next to the content (aligned top-right), */
58 display: inline-block
;
61 /* sum must match ol>li {text-indent:} (40px is Mozillas default) */
64 /* background: yellow; */
67 /* The list item's first line starts next to the label, without indent */
68 ol
> li
> p:first-child
,
69 ol
> li
> ol:first-child
,
70 ol
> li
> ul:first-child
,
71 ol
> li
> dl:first-child
{
72 display: inline-block
;
73 /* background: lightblue; */
76 /* default separator variants */
77 ol
.loweralpha
> li:before
{
78 content: counter
(item
, lower-alpha
) ")";
80 ol
.upperalpha
> li:before
{
81 content: counter
(item
, upper-alpha
) ".";
83 ol
.lowerroman
> li:before
{
84 content: "(" counter
(item
, lower-roman
) ")";
86 ol
.upperroman
> li:before
{
87 content: counter
(item
, upper-roman
) ")";
89 /* nested counters (1, 1.1, 1.1.1, etc) */
90 /* nested enumerated lists "inherit" the class attribute, other lists not */
91 ol
.nested
> li:before
, ol
.nested ol
> li:before
{
92 content: counters
(item
, ".") " ";
100 /* field-list variants:: */
102 /* wrap or truncate long field names */
103 dl
.field-list
.fix-labelwidth
> dt
{
104 width: 8em; /* set to dl.field-list > dd margin-left - padding-left */
107 dl
.field-list
.fix-labelwidth
> dd:after
{
108 /* a "stopper" to prevent next dd floating up too far */
112 vertical-align: baseline
;