Use different types
[llpp.git] / misc / wikipedia / wiki2.css
blobb71dcfbc142b587a5a6a1c1bb50064f6ad5f6e78
1 /*
2 CSS style sheet for Wikipedia articles.
4 Written by Hakon Wium Lie March 2008.
6 This style sheet may be reused by anyone for any purpose.
8 Here's an example of how to use the style sheet:
10 prince --no-author-style -s http://www.princexml.com/howcome/2008/wikipedia/wiki2.css http://en.wikipedia.org/wiki/Winter_war -o foo.pdf
13 /* malc */
14 @font-face { font-family: sans-serif; src: local("pt sans"); }
15 @font-face { font-family: serif; src: local("pt astra serif"); }
16 @font-face { font-family: monospace; src: local("monofur"); }
18 /* set headers and footers */
19 @page {
20 size: a4;
21 margin: 4cm;
23 @top-right {
24 content: string(title);
25 font-style: italic;
27 @top-left {
28 content: string(source);
29 font-style: italic;
31 @bottom-center {
32 content: counter(page);
33 vertical-align: top;
34 padding-top: 1em;
38 #siteSub { string-set: source content() }
40 /* basic style settings*/
41 body {
42 font: 16pt/1.3 "alegreya", "code2003", "symbola", "serif";
43 prince-linebreak-magic: auto;
44 hyphens: auto;
45 text-align: justify;
46 prince-image-resolution: normal;
49 ul, ol, dl { text-align: left; hyphens: manual; }
51 h1, h2, h3, h4, h5, h6 {
52 line-height: 1.2;
53 padding: 0;
54 margin: 0.7em 0 0.2em;
55 font-weight: normal;
56 text-align: left;
57 page-break-after: avoid;
58 clear: both;
61 a { text-decoration: none; color: inherit; }
63 p { padding: 0; margin: 0 }
65 blockquote p {
66 font-size: 1em;
67 font-style: italic;
70 /* text indentation */
71 p + p { text-indent: 1.5em }
72 div.thumb + p { text-indent: 1.5em }
73 h2 + div.thumb + p { text-indent: 0 }
74 h3 + div.thumb + p { text-indent: 0 }
75 h2 + div.thumb + div.thumb + p { text-indent: 0 }
76 h3 + div.thumb + div.thumb + p { text-indent: 0 }
77 h2 + dl + div.thumb + p { text-indent: 0 }
78 h3 + dl + div.thumb + p { text-indent: 0 }
80 div + div.thumb + p { text-indent: 0 }
82 #toc { display: none }
84 ul {
85 list-style-type: disc;
86 margin-left: 1.3em;
89 /* put article heading on top of the page, spanning all columns */
90 h1.firstHeading {
91 float: top;
92 string-set: title content();
93 padding-bottom: 0.2em;
94 border-bottom: thin solid black;
95 margin-bottom: 1em;
98 #footer { padding-top: 1em }
99 #footer ul {
100 list-style-type: none;
101 margin-left: 0;
104 #footer li { display: inline }
105 #footer br { display: none ! important }
106 #privacy, #about, #disclaimer { display: none }
108 /* images */
109 .thumb, .thumbinner, img, .thumbcaption {
110 border: none; margin: 0; padding: 0;
111 page-break-inside: avoid;
114 .thumb {
115 margin: 0.2em 0;
116 float: prince-column-top-if-necessary;
119 .thumb img {
120 width: 100%;
121 height: auto;
124 .thumbcaption {
125 background: #fff;
126 text-align: left;
127 font-style: italic;
128 font-size: 1em;
129 line-height: 1.2em;
130 padding-bottom: 0.3em;
131 border-bottom: thin solid gray;
132 margin-bottom: 1em;
135 div, img { max-width: 100% }
137 img.thumbborder { border: thin solid black }
139 .infobox img { width: auto; height: auto; max-width: 95% }
141 /* notes */
143 li > b:first-child { display: none }
145 a[href^="/wiki"] { color: #400 }
146 a { color: #004 }
148 #siteSub {
149 display: block;
150 font-style: italic;
151 margin: 0.3em 0
154 h2 + dl { display: none } /* these hide tag abuse */
155 h3 + dl { display: none }
157 /* tables */
158 tr, td, th { margin: 0; padding: 0.1em 0.3em; text-align: left; vertical-align: top }
160 div.center, th[align="center"] { text-align: center }
162 /* infoboxes are troublesome */
163 .infobox {
164 float: none;
165 width: 100%;
166 text-align: left;
167 border-collapse: collapse;
168 line-height: 1.2em;
169 font-size: 90%;
170 margin: 0 0 1em;
171 padding: 0;
172 background: #ddd;
173 hyphens: manual;
174 border: solid 1px #aaa;
177 .infobox td,
178 .infobox th {
179 border: none;
180 border-top: solid 1px #aaa;
181 padding: 0.4em 0.6em 0.4em 0.6em;
184 .infobox .mergedtoprow td,
185 .infobox .mergedtoprow th {
186 border-top: solid 1px #aaa;
187 padding: 0.4em 0.6em 0.2em 0.6em;
190 .infobox .mergedrow td,
191 .infobox .mergedrow th {
192 border: 0;
193 padding: 0 0.6em 0.2em 0.6em;
196 .infobox .mergedbottomrow td,
197 .infobox .mergedbottomrow th {
198 border-top: 0;
199 border-bottom: solid 1px #aaa;
200 padding: 0 0.6em 0.4em 0.6em;
203 .infobox .maptable td,
204 .infobox .maptable th {
205 border: 0;
206 padding: 0;
209 table.wikitable { float: top; width: 100%; border-collapse: collapse; border-bottom: thin solid black; margin-bottom: 1em }
210 table.wikitable, table.wikitable td, table.wikitable th { border: thin solid black; padding: 0.2em; text-align: left }
212 table.wikitable[align] { float: none; width: 100%; margin: 1em 0 }
213 table.wikitable[align] td { padding: 0.2em 0.3em }
214 table.wikitable[align] th { padding: 0.2em 0.3em; text-align: center; font-weight: bold }
216 table.wikitable img { width: auto; height: auto; prince-image-resolution: 1800dpi }
218 .ambox { border: thin solid black; padding: 0.3em; margin: 0.7em 0 }
220 table.collapsible { display: none }
222 /* remove elements */
224 #administrator, #protected-icon, #siteSub, .magnify, .noprint, #jump-to-nav, .navbox, .top, #column-one, #colophon, .editsection, .toctoggle, .tochidden, #f-poweredbyico, #f-copyrightico, #viewcount, #about, #disclaimer, #privacy, #contentSub, #privacy, #about, #disclaimers, #mw-hidden-catlinks, .dablink, .sisterproject, .metadata { display: none }
226 hr { display: none }
228 .printfooter, #footer, #catlinks { float: bottom; margin: 0.5em 0; page-break-after: avoid }
230 #catlinks { prince-text-replace: " |" ", " }
232 sup { vertical-align: baseline }
233 sup { vertical-align: top }
235 ol, ul { margin-left: 1.5em }
237 ol.references { margin-left: 2.2em }
238 ol.references li::marker {
239 width: 2.2em;
240 padding-right: 0;
241 text-align: left;
242 content: "[" counter(list-item) "]";
245 /* remove those pesky '' characters */
246 body { prince-text-replace: "'" "\2019" }
249 /* remove visible markers references */
250 ol.references li a[href|="#cite_ref"] { display: none }