Adjust print styles for thumb
[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 ul {
135 list-style-type: square;
136 }
137
138 /**
139 * MediaWiki-specific elements
140 */
141 #globalWrapper {
142 width: 100% !important; /* stylelint-disable-line declaration-no-important */
143 min-width: 0 !important; /* stylelint-disable-line declaration-no-important */
144 }
145
146 .mw-body {
147 background: #fff;
148 color: #000;
149 border: 0 !important; /* stylelint-disable-line declaration-no-important */
150 padding: 0 !important; /* stylelint-disable-line declaration-no-important */
151 margin: 0 !important; /* stylelint-disable-line declaration-no-important */
152 direction: ltr;
153 }
154
155 #column-content {
156 margin: 0 !important; /* stylelint-disable-line declaration-no-important */
157 }
158
159 #column-content .mw-body {
160 padding: 1em;
161 margin: 0 !important; /* stylelint-disable-line declaration-no-important */
162 }
163
164 #toc,
165 .toc {
166 background-color: #f9f9f9;
167 border: 1pt solid #aaa;
168 padding: 5px;
169 display: table;
170 }
171
172 /* Separate columns for `.tocnumber` and `.toctext` */
173 .tocnumber,
174 .toctext {
175 display: table-cell;
176 }
177
178 /* Space between those columns */
179 .tocnumber {
180 padding-left: 0;
181 padding-right: 0.5em;
182 }
183
184 /* @noflip */
185 .mw-content-ltr .tocnumber {
186 padding-left: 0;
187 padding-right: 0.5em;
188 }
189
190 /* @noflip */
191 .mw-content-rtl .tocnumber {
192 padding-left: 0.5em;
193 padding-right: 0;
194 }
195
196 /**
197 * Floating divs (and thumbnails)
198 */
199 /* @noflip */
200 div.floatright,
201 div.tright {
202 float: right;
203 clear: right;
204 position: relative;
205 margin: 0.5em 0 0.8em 1.4em;
206 }
207
208 div.floatright p {
209 font-style: italic;
210 }
211
212 /* @noflip */
213 div.floatleft,
214 div.tleft {
215 float: left;
216 clear: left;
217 position: relative;
218 margin: 0.5em 1.4em 0.8em 0;
219 }
220
221 div.floatleft p {
222 font-style: italic;
223 }
224
225 .center {
226 text-align: center;
227 }
228
229 /**
230 * Thumbnails
231 */
232 div.thumb {
233 background-color: transparent;
234 width: auto;
235 }
236
237 div.thumb a {
238 border-bottom: 0;
239 }
240
241 div.thumbinner {
242 background-color: #fff;
243 border: 0;
244 border-radius: 2px;
245 padding: 5px;
246 font-size: 10pt;
247 color: #666;
248 text-align: center;
249 /* new block formatting context,
250 * to clear background from floating content */
251 overflow: hidden;
252 min-width: 100px;
253 }
254
255 html .thumbcaption {
256 text-align: left;
257 line-height: 1.4;
258 padding: 3px;
259 }
260
261 img.thumbborder {
262 border: 1pt solid #ddd;
263 }
264
265 /**
266 * Table rendering
267 * As on shared.css but with white background.
268 */
269 table.wikitable,
270 table.mw_metadata {
271 background: #fff;
272 margin: 1em 0;
273 border: 1pt solid #aaa;
274 border-collapse: collapse;
275 }
276
277 table.wikitable > caption,
278 .mw_metadata caption {
279 font-weight: bold;
280 }
281
282 table.wikitable > tr > th,
283 table.wikitable > tr > td,
284 table.wikitable > * > tr > th,
285 table.wikitable > * > tr > td,
286 .mw_metadata th,
287 .mw_metadata td {
288 border: 1pt solid #aaa;
289 padding: 0.2em;
290 }
291
292 table.wikitable > tr > th,
293 table.wikitable > * > tr > th,
294 .mw_metadata th {
295 background: #fff;
296 font-weight: bold;
297 text-align: center;
298 }
299
300 table.listing,
301 table.listing td {
302 border: 1pt solid #000;
303 border-collapse: collapse;
304 }
305
306 /**
307 * Categories
308 */
309 .catlinks ul {
310 display: inline;
311 padding: 0;
312 list-style: none none;
313 }
314
315 .catlinks li {
316 display: inline-block;
317 line-height: 1.15;
318 margin: 0.1em 0;
319 border-left: 1pt solid #aaa;
320 padding: 0 0.4em;
321 }
322
323 .catlinks li:first-child {
324 border-left: 0;
325 padding-left: 0.2em;
326 }
327
328 /**
329 * Footer
330 */
331 .printfooter {
332 padding: 1em 0;
333 }
334
335 #footer {
336 background: #fff;
337 color: #000;
338 margin-top: 1em;
339 border-top: 1pt solid #aaa;
340 padding-top: 5px;
341 direction: ltr;
342 }