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
("iosevka malc"); }
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: 14pt/1.3 "pt astra serif", "alegreya", "El Messiri", "symbola",
44 prince-linebreak-magic: auto
;
47 prince-image-resolution: normal
;
50 ul
, ol
, dl
{ text-align: left
; hyphens: manual
; }
52 h1
, h2
, h3
, h4
, h5
, h6
{
55 margin: 0.7em 0 0.2em;
58 page-break-after: avoid
;
62 a
{ text-decoration: none
; color: inherit
; }
64 p
{ padding: 0; margin: 0 }
71 /* text indentation */
72 p
+ p
{ text-indent: 1.5em }
73 div
.thumb
+ p
{ text-indent: 1.5em }
74 h2
+ div
.thumb
+ p
{ text-indent: 0 }
75 h3
+ div
.thumb
+ p
{ text-indent: 0 }
76 h2
+ div
.thumb
+ div
.thumb
+ p
{ text-indent: 0 }
77 h3
+ div
.thumb
+ div
.thumb
+ p
{ text-indent: 0 }
78 h2
+ dl
+ div
.thumb
+ p
{ text-indent: 0 }
79 h3
+ dl
+ div
.thumb
+ p
{ text-indent: 0 }
81 div
+ div
.thumb
+ p
{ text-indent: 0 }
83 #toc { display: none
}
86 list-style-type: disc
;
90 /* put article heading on top of the page, spanning all columns */
93 string-set: title content
();
94 padding-bottom: 0.2em;
95 border-bottom: thin solid black
;
99 #footer { padding-top: 1em }
101 list-style-type: none
;
105 #footer li
{ display: inline
}
106 #footer br
{ display: none
! important
}
107 #privacy, #about
, #disclaimer
{ display: none
}
110 .thumb, .thumbinner, img, .thumbcaption {
111 border: none
; margin: 0; padding: 0;
112 page-break-inside: avoid
;
117 float: prince-column-top-if-necessary
;
131 padding-bottom: 0.3em;
132 border-bottom: thin solid gray
;
136 div
, img
{ max-width: 100% }
138 img
.thumbborder
{ border: thin solid black
}
140 .infobox img { width: auto
; height: auto
; max-width: 95% }
144 li
> b:first-child
{ display: none
}
146 a
[href^
="/wiki"] { color: #400 }
155 h2
+ dl
{ display: none
} /* these hide tag abuse */
156 h3
+ dl
{ display: none
}
159 tr
, td
, th
{ margin: 0; padding: 0.1em 0.3em; text-align: left
; vertical-align: top
}
161 div
.center
, th
[align
="center"] { text-align: center
}
163 /* infoboxes are troublesome */
168 border-collapse: collapse
;
175 border: solid
1px #aaa;
181 border-top: solid
1px #aaa;
182 padding: 0.4em 0.6em 0.4em 0.6em;
185 .infobox
.mergedtoprow td
,
186 .infobox .mergedtoprow th {
187 border-top: solid
1px #aaa;
188 padding: 0.4em 0.6em 0.2em 0.6em;
191 .infobox
.mergedrow td
,
192 .infobox .mergedrow th {
194 padding: 0 0.6em 0.2em 0.6em;
197 .infobox
.mergedbottomrow td
,
198 .infobox .mergedbottomrow th {
200 border-bottom: solid
1px #aaa;
201 padding: 0 0.6em 0.4em 0.6em;
204 .infobox
.maptable td
,
205 .infobox .maptable th {
210 table
.wikitable
{ float: top
; width: 100%; border-collapse: collapse
; border-bottom: thin solid black
; margin-bottom: 1em }
211 table
.wikitable
, table
.wikitable td
, table
.wikitable th
{ border: thin solid black
; padding: 0.2em; text-align: left
}
213 table
.wikitable
[align
] { float: none
; width: 100%; margin: 1em 0 }
214 table
.wikitable
[align
] td
{ padding: 0.2em 0.3em }
215 table
.wikitable
[align
] th
{ padding: 0.2em 0.3em; text-align: center
; font-weight: bold
}
217 table
.wikitable img
{ width: auto
; height: auto
; prince-image-resolution: 1800dpi }
219 .ambox { border: thin solid black
; padding: 0.3em; margin: 0.7em 0 }
221 table
.collapsible
{ display: none
}
223 /* remove elements */
225 #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
}
229 .printfooter, #footer, #catlinks { float: bottom
; margin: 0.5em 0; page-break-after: avoid
}
231 #catlinks { prince-text-replace: " |" ", " }
233 sup
{ vertical-align: baseline
}
234 sup
{ vertical-align: top
}
236 ol
, ul
{ margin-left: 1.5em }
238 ol
.references
{ margin-left: 2.2em }
239 ol
.references
li::marker
{
243 content: "[" counter
(list-item
) "]";
246 /* remove those pesky '' characters */
247 body
{ prince-text-replace: "'" "\2019" }
250 /* remove visible markers references */
251 ol
.references li a
[href|
="#cite_ref"] { display: none
}