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