Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / resources / src / mediawiki.legacy / commonPrint.css
1 /**
2 * MediaWiki print style sheet
3 * Largely based on work by Gabriel Wicke
4 *
5 * Originally derived from Plone (https://plone.org/) styles
6 * Copyright Alexander Limi
7 */
8
9 /**
10 * Hide all the elements irrelevant for printing
11 * Skins however can and should override.
12 */
13 /* General hide-in-print class, please only use sparely */
14 .noprint,
15 /* Various content classes, in alphabetical order */
16 .catlinks,
17 .magnify,
18 .mw-cite-backlink,
19 .mw-editsection,
20 .mw-editsection-like,
21 .mw-hidden-catlinks,
22 .mw-indicators,
23 .mw-redirectedfrom,
24 .patrollink,
25 .usermessage,
26 /* Various content ids, in alphabetical order */
27 #column-one,
28 #footer-places,
29 #mw-navigation,
30 #siteNotice,
31 /* Deprecated, changed in core */
32 #f-poweredbyico,
33 #f-copyrightico,
34 li#about,
35 li#disclaimer,
36 li#mobileview,
37 li#privacy {
38 display: none;
39 }
40
41 /**
42 * Generic HTML elements
43 */
44 body {
45 background: #fff;
46 color: #000;
47 margin: 0;
48 padding: 0;
49 }
50
51 /* Links */
52 a {
53 background: none !important; /* stylelint-disable-line declaration-no-important */
54 padding: 0 !important; /* stylelint-disable-line declaration-no-important */
55 }
56
57 a,
58 a.external,
59 a.new,
60 a.stub {
61 /* IE 6 & 7 don't understand `inherit` */
62 color: #000 !important; /* stylelint-disable-line declaration-no-important */
63 text-decoration: none !important; /* stylelint-disable-line declaration-no-important */
64 /* Modern browser will apply this, IE 6 & 7 ignore the unknown */
65 color: inherit !important; /* stylelint-disable-line declaration-block-no-duplicate-properties, declaration-no-important */
66 text-decoration: inherit !important; /* stylelint-disable-line declaration-block-no-duplicate-properties, declaration-no-important */
67 }
68
69 /* Expand URLs for printing */
70 .mw-parser-output a.external.text:after,
71 .mw-parser-output a.external.autonumber:after {
72 content: ' (' attr( href ) ')';
73 word-break: break-all;
74 word-wrap: break-word;
75 }
76
77 /* Expand protocol-relative URLs for printing */
78 .mw-parser-output a.external.text[ href^='//' ]:after,
79 .mw-parser-output a.external.autonumber[ href^='//' ]:after {
80 content: ' (https:' attr( href ) ')';
81 }
82
83 dt {
84 font-weight: bold;
85 }
86
87 h1,
88 h2,
89 h3,
90 h4,
91 h5,
92 h6 {
93 font-weight: bold;
94 /* Pagination */
95 page-break-after: avoid;
96 page-break-before: avoid;
97 }
98
99 p {
100 margin: 1em 0;
101 line-height: 1.2;
102 /* Pagination */
103 orphans: 3;
104 widows: 3;
105 }
106
107 img,
108 figure,
109 .wikitable,
110 .thumb {
111 /* Pagination */
112 page-break-inside: avoid;
113 }
114
115 img {
116 border: 0;
117 vertical-align: middle;
118 }
119
120 pre,
121 .mw-code {
122 background: #fff;
123 color: #000;
124 border: 1pt dashed #000;
125 padding: 1em 0;
126 font-size: 8pt;
127 white-space: pre-wrap;
128 word-wrap: break-word;
129 }
130
131 /* Prevent citations and subscripts from interfering with the line-height */
132 sup,
133 sub {
134 line-height: 1;
135 }
136
137 ul {
138 list-style-type: square;
139 }
140
141 /**
142 * MediaWiki-specific elements
143 */
144 #globalWrapper {
145 width: 100% !important; /* stylelint-disable-line declaration-no-important */
146 min-width: 0 !important; /* stylelint-disable-line declaration-no-important */
147 }
148
149 .mw-body {
150 background: #fff;
151 color: #000;
152 border: 0 !important; /* stylelint-disable-line declaration-no-important */
153 padding: 0 !important; /* stylelint-disable-line declaration-no-important */
154 margin: 0 !important; /* stylelint-disable-line declaration-no-important */
155 direction: ltr;
156 }
157
158 #column-content {
159 margin: 0 !important; /* stylelint-disable-line declaration-no-important */
160 }
161
162 #column-content .mw-body {
163 padding: 1em;
164 margin: 0 !important; /* stylelint-disable-line declaration-no-important */
165 }
166
167 .toc {
168 background-color: #f9f9f9;
169 border: 1pt solid #aaa;
170 padding: 5px;
171 display: table;
172 }
173
174 /* Separate columns for `.tocnumber` and `.toctext` */
175 .tocnumber,
176 .toctext {
177 display: table-cell;
178 }
179
180 /* Space between those columns */
181 .tocnumber {
182 padding-left: 0;
183 padding-right: 0.5em;
184 }
185
186 /* @noflip */
187 .mw-content-ltr .tocnumber {
188 padding-left: 0;
189 padding-right: 0.5em;
190 }
191
192 /* @noflip */
193 .mw-content-rtl .tocnumber {
194 padding-left: 0.5em;
195 padding-right: 0;
196 }
197
198 /**
199 * Floating divs (and thumbnails)
200 */
201 /* @noflip */
202 table.floatright,
203 div.floatright,
204 div.tright {
205 float: right;
206 clear: right;
207 position: relative;
208 }
209
210 /* @noflip */
211 table.floatleft,
212 div.floatleft,
213 div.tleft {
214 float: left;
215 clear: left;
216 position: relative;
217 }
218
219 /* @noflip */
220 div.tleft {
221 margin: 0.5em 1.4em 1.3em 0;
222 }
223
224 /* @noflip */
225 div.tright {
226 margin: 0.5em 0 1.3em 1.4em;
227 }
228
229 /* @noflip */
230 table.floatright,
231 div.floatright {
232 margin: 0 0 0.5em 0.5em;
233 border: 0;
234 }
235
236 /* @noflip */
237 table.floatleft,
238 div.floatleft {
239 margin: 0 0.5em 0.5em 0;
240 border: 0;
241 }
242
243 div.floatleft p,
244 div.floatright p {
245 font-style: italic;
246 }
247
248 .center {
249 text-align: center;
250 }
251
252 /**
253 * Thumbnails
254 */
255 div.thumb {
256 background-color: transparent;
257 width: auto;
258 }
259
260 div.thumb a {
261 border-bottom: 0;
262 }
263
264 div.thumbinner {
265 background-color: #fff;
266 border: 0;
267 border-radius: 2px;
268 padding: 5px;
269 font-size: 10pt;
270 color: #666;
271 text-align: center;
272 /* new block formatting context,
273 * to clear background from floating content */
274 overflow: hidden;
275 min-width: 100px;
276 }
277
278 html .thumbcaption {
279 text-align: left;
280 line-height: 1.4;
281 padding: 3px;
282 }
283
284 img.thumbborder {
285 border: 1pt solid #ddd;
286 }
287
288 /**
289 * Table rendering
290 */
291 /* Compare `table.wikitable` in shared.css */
292 table.wikitable,
293 .mw_metadata {
294 background: #fff;
295 margin: 1em 0;
296 border: 1pt solid #aaa;
297 border-collapse: collapse;
298 font-size: 10pt;
299 }
300
301 table.wikitable > caption,
302 .mw_metadata caption {
303 padding: 5px;
304 font-size: 10pt;
305 }
306
307 table.wikitable > tr > th,
308 table.wikitable > tr > td,
309 table.wikitable > * > tr > th,
310 table.wikitable > * > tr > td,
311 .mw_metadata th,
312 .mw_metadata td {
313 /* Important is required to override any inline styles provided by editors */
314 background: #fff !important; /* stylelint-disable-line declaration-no-important */
315 /* We need to also set color in case editors applied a light text color */
316 color: #000 !important; /* stylelint-disable-line declaration-no-important */
317 border: 1pt solid #aaa;
318 padding: 0.4em 0.6em;
319 }
320
321 table.wikitable > tr > th,
322 table.wikitable > * > tr > th,
323 .mw_metadata th {
324 text-align: center;
325 }
326
327 table.listing,
328 table.listing td {
329 border: 1pt solid #000;
330 border-collapse: collapse;
331 }
332
333 /**
334 * Categories
335 */
336 .catlinks ul {
337 display: inline;
338 padding: 0;
339 list-style: none none;
340 }
341
342 .catlinks li {
343 display: inline-block;
344 line-height: 1.15;
345 margin: 0.1em 0;
346 border-left: 1pt solid #aaa;
347 padding: 0 0.4em;
348 }
349
350 .catlinks li:first-child {
351 border-left: 0;
352 padding-left: 0.2em;
353 }
354
355 /**
356 * Footer
357 */
358 .printfooter {
359 padding: 1em 0;
360 }
361
362 #footer {
363 background: #fff;
364 color: #000;
365 margin-top: 1em;
366 border-top: 1pt solid #aaa;
367 padding-top: 5px;
368 direction: ltr;
369 }