3 CSS style sheet for Wikipedia articles.
5 Written by Hakon Wium Lie March 2008.
7 This style sheet may be reused by anyone for any purpose.
9 Here's an example of how to use the style sheet:
11 prince --no-author-style -s http://www.princexml.com/howcome/2008/wikipedia/wiki2.css http://en.wikipedia.org/wiki/Winter_war -o foo.pdf
15 /* @import url(http://www.princexml.com/fonts/gentium/index.css); */
17 /* set headers and footers */
25 font: 11pt/1.3 "Gentium Plus", serif
;
28 content: string
(title
);
32 content: string
(source
);
36 content: counter
(page
);
42 #siteSub { string-set: source content
() }
44 /* basic style settings*/
47 font: 14pt/1.3 "Gentium Plus", "FreeSerif", "Noto Serif", serif
, "FreeSans",
49 prince-linebreak-magic: auto
;
52 prince-image-resolution: auto
, 1800dpi;
55 ul
, ol
, dl
{ text-align: left
; hyphens: manual
; }
57 h1
, h2
, h3
, h4
, h5
, h6
{
60 margin: 0.7em 0 0.2em;
63 page-break-after: avoid
;
67 a
{ text-decoration: none
; color: inherit
; }
69 p
{ padding: 0; margin: 0 }
77 /* text indentation */
79 p
+ p
{ text-indent: 1.5em }
80 div
.thumb
+ p
{ text-indent: 1.5em }
81 h2
+ div
.thumb
+ p
{ text-indent: 0 }
82 h3
+ div
.thumb
+ p
{ text-indent: 0 }
83 h2
+ div
.thumb
+ div
.thumb
+ p
{ text-indent: 0 }
84 h3
+ div
.thumb
+ div
.thumb
+ p
{ text-indent: 0 }
85 h2
+ dl
+ div
.thumb
+ p
{ text-indent: 0 }
86 h3
+ dl
+ div
.thumb
+ p
{ text-indent: 0 }
89 div
+ div
.thumb
+ p
{ text-indent: 0 }
92 #toc { display: none
}
96 list-style-type: disc
;
100 /* put article heading on top of the page, spanning all columns */
104 string-set: title content
();
105 padding-bottom: 0.2em;
106 border-bottom: thin solid black
;
111 #footer { padding-top: 1em }
113 list-style-type: none
;
117 #footer li
{ display: inline
}
118 #footer br
{ display: none
! important
}
119 #privacy, #about
, #disclaimer
{ display: none
}
123 .thumb, .thumbinner, img, .thumbcaption {
124 border: none
; margin: 0; padding: 0;
125 page-break-inside: avoid
;
130 float: prince-column-top-if-necessary
;
144 padding-bottom: 0.3em;
145 border-bottom: thin solid gray
;
149 div
, img
{ max-width: 100% }
151 img
.thumbborder
{ border: thin solid black
}
153 .infobox img { width: auto
; height: auto
; max-width: 95% }
158 li
> b:first-child
{ display: none
}
160 a
[href^
="/wiki"] { color: #400 }
169 h2
+ dl
{ display: none
} /* these hide tag abuse */
170 h3
+ dl
{ display: none
}
174 tr
, td
, th
{ margin: 0; padding: 0.1em 0.3em; text-align: left
; vertical-align: top
}
176 div
.center
, th
[align
="center"] { text-align: center
}
178 /* infoboxes are troublesome */
184 border-collapse: collapse
;
191 border: solid
1px #aaa;
197 border-top: solid
1px #aaa;
198 padding: 0.4em 0.6em 0.4em 0.6em;
201 .infobox
.mergedtoprow td
,
202 .infobox .mergedtoprow th {
203 border-top: solid
1px #aaa;
204 padding: 0.4em 0.6em 0.2em 0.6em;
207 .infobox
.mergedrow td
,
208 .infobox .mergedrow th {
210 padding: 0 0.6em 0.2em 0.6em;
213 .infobox
.mergedbottomrow td
,
214 .infobox .mergedbottomrow th {
216 border-bottom: solid
1px #aaa;
217 padding: 0 0.6em 0.4em 0.6em;
220 .infobox
.maptable td
,
221 .infobox .maptable th {
226 table
.wikitable
{ float: top
; width: 100%; border-collapse: collapse
; border-bottom: thin solid black
; margin-bottom: 1em }
227 table
.wikitable
, table
.wikitable td
, table
.wikitable th
{ border: thin solid black
; padding: 0.2em; text-align: left
}
229 table
.wikitable
[align
] { float: none
; width: 100%; margin: 1em 0 }
230 table
.wikitable
[align
] td
{ padding: 0.2em 0.3em }
231 table
.wikitable
[align
] th
{ padding: 0.2em 0.3em; text-align: center
; font-weight: bold
}
233 table
.wikitable img
{ width: auto
; height: auto
; prince-image-resolution: 150dpi }
235 .ambox { border: thin solid black
; padding: 0.3em; margin: 0.7em 0 }
237 table
.collapsible
{ display: none
}
239 /* remove elements */
241 #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
}
245 .printfooter, #footer, #catlinks { float: bottom
; margin: 0.5em 0; page-break-after: avoid
}
247 #catlinks { prince-text-replace: " |" ", " }
249 sup
{ vertical-align: baseline
}
250 sup
{ vertical-align: top
}
252 ol
, ul
{ margin-left: 1.5em }
254 ol
.references
{ margin-left: 2.2em }
255 ol
.references
li::marker
{
259 content: "[" counter
(list-item
) "]";
262 /* remove those pesky '' characters */
264 body
{ prince-text-replace: "'" "\2019" }
267 /* remove visible markers references */
269 ol
.references li a
[href|
="#cite_ref"] { display: none
}
272 ol.references li { prince-text-replace: "^" "" }
273 ol.references li a { prince-text-replace: none }
274 ol.references li a sup i b { prince-text-replace: "a" "" "b" "" "c" "" "d" "" "e" "" "f" "" "g" "" "h" "" "i" "" "j" "" "k" "" "l" "" "m" ""}