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
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 */
24 content: string
(title
);
28 content: string
(source
);
32 content: counter
(page
);
38 #siteSub { string-set: source content
() }
40 /* basic style settings*/
42 font: 16pt/1.3 "alegreya", "code2003", "serif";
43 prince-linebreak-magic: auto
;
46 prince-image-resolution: normal
;
49 ul
, ol
, dl
{ text-align: left
; hyphens: manual
; }
51 h1
, h2
, h3
, h4
, h5
, h6
{
54 margin: 0.7em 0 0.2em;
57 page-break-after: avoid
;
61 a
{ text-decoration: none
; color: inherit
; }
63 p
{ padding: 0; margin: 0 }
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
}
85 list-style-type: disc
;
89 /* put article heading on top of the page, spanning all columns */
92 string-set: title content
();
93 padding-bottom: 0.2em;
94 border-bottom: thin solid black
;
98 #footer { padding-top: 1em }
100 list-style-type: none
;
104 #footer li
{ display: inline
}
105 #footer br
{ display: none
! important
}
106 #privacy, #about
, #disclaimer
{ display: none
}
109 .thumb, .thumbinner, img, .thumbcaption {
110 border: none
; margin: 0; padding: 0;
111 page-break-inside: avoid
;
116 float: prince-column-top-if-necessary
;
130 padding-bottom: 0.3em;
131 border-bottom: thin solid gray
;
135 div
, img
{ max-width: 100% }
137 img
.thumbborder
{ border: thin solid black
}
139 .infobox img { width: auto
; height: auto
; max-width: 95% }
143 li
> b:first-child
{ display: none
}
145 a
[href^
="/wiki"] { color: #400 }
154 h2
+ dl
{ display: none
} /* these hide tag abuse */
155 h3
+ dl
{ display: none
}
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 */
167 border-collapse: collapse
;
174 border: solid
1px #aaa;
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 {
193 padding: 0 0.6em 0.2em 0.6em;
196 .infobox
.mergedbottomrow td
,
197 .infobox .mergedbottomrow th {
199 border-bottom: solid
1px #aaa;
200 padding: 0 0.6em 0.4em 0.6em;
203 .infobox
.maptable td
,
204 .infobox .maptable th {
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
}
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
{
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
}