Debian Codegraph @

skins/Timeless/resources/libraries/common-print.less

raw
1 /**
2 * Fork of the MediaWiki 1.34 print style sheet
3 * Governs common content objects.
4 */
5
6 @content-background: #fff;
7 @text: #000;
8 @block-background: #f9f9f9;
9 @block-border: #aaa;
10
11 /**
12 * Hide all the elements irrelevant for printing
13 */
14 /* General hide-in-print class, please only use sparely */
15 .noprint,
16 /* Various content classes, in alphabetical order */
17 .catlinks,
18 .magnify,
19 .mw-cite-backlink,
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 #siteNotice,
29 #siteSub {
30 display: none;
31 }
32
33 /**
34 * Generic HTML elements
35 */
36 body {
37 background: @content-background;
38 color: @text;
39 margin: 0;
40 padding: 0;
41 }
42
43 /* Links */
44 a {
45 background: none !important; /* stylelint-disable-line declaration-no-important */
46 padding: 0 !important; /* stylelint-disable-line declaration-no-important */
47 }
48
49 a,
50 a.external,
51 a.new,
52 a.stub {
53 color: inherit !important; /* stylelint-disable-line declaration-no-important */
54 text-decoration: inherit !important; /* stylelint-disable-line declaration-no-important */
55 }
56
57 dt {
58 font-weight: bold;
59 }
60
61 .mw-heading,
62 h1,
63 h2,
64 h3,
65 h4,
66 h5,
67 h6 {
68 font-weight: bold;
69 margin: 2em 0 0.5em;
70 /* Pagination */
71 page-break-after: avoid;
72 page-break-before: avoid;
73 }
74
75 .mw-heading h1,
76 .mw-heading h2,
77 .mw-heading h3,
78 .mw-heading h4,
79 .mw-heading h5,
80 .mw-heading h6 {
81 margin: 0;
82 }
83
84 .firstHeading {
85 margin-top: 0;
86 }
87
88 p {
89 margin: 1em 0;
90 line-height: 1.2;
91 /* Pagination */
92 orphans: 3;
93 widows: 3;
94 }
95
96 img,
97 figure,
98 .wikitable,
99 .thumb {
100 /* Pagination */
101 page-break-inside: avoid;
102 }
103
104 img {
105 border: 0;
106 vertical-align: middle;
107 }
108
109 pre,
110 .mw-code {
111 background: @block-background;
112 color: @text;
113 border: 1pt dashed @block-border;
114 padding: 1em;
115 font-size: 8pt;
116 white-space: pre-wrap;
117 word-wrap: break-word;
118 }
119
120 /* Prevent citations and subscripts from interfering with the line-height */
121 sup,
122 sub {
123 line-height: 1;
124 }
125
126 ul {
127 list-style-type: disc;
128 }
129
130 /**
131 * MediaWiki-specific elements
132 */
133
134 .toc {
135 border: 1pt solid @block-border;
136 padding: 5px 5px 7px;
137 display: table;
138 background: @block-background;
139
140 ul {
141 list-style: none;
142
143 a {
144 display: block;
145 padding: 0.125em 0 !important; /* stylelint-disable-line declaration-no-important */
146 }
147 }
148
149 & > ul {
150 margin: 0;
151 padding-left: 0;
152 }
153
154 h2 {
155 margin-top: 0;
156 }
157 }
158
159 /* @noflip */
160 .mw-content-ltr .tocnumber {
161 padding-left: 0;
162 padding-right: 0.5em;
163 }
164
165 /* @noflip */
166 .mw-content-rtl .tocnumber {
167 padding-left: 0.5em;
168 padding-right: 0;
169 }
170
171 /**
172 * Floating divs (and thumbnails)
173 */
174 /* @noflip */
175 table.floatright,
176 div.floatright,
177 div.tright {
178 float: right;
179 clear: right;
180 position: relative;
181 }
182
183 /* @noflip */
184 table.floatleft,
185 div.floatleft,
186 div.tleft {
187 float: left;
188 clear: left;
189 position: relative;
190 }
191
192 /* @noflip */
193 div.tleft {
194 margin: 0.5em 1.4em 1.3em 0;
195 }
196
197 /* @noflip */
198 div.tright {
199 margin: 0.5em 0 1.3em 1.4em;
200 }
201
202 /* @noflip */
203 table.floatright,
204 div.floatright {
205 margin: 0 0 0.5em 0.5em;
206 border: 0;
207 }
208
209 /* @noflip */
210 table.floatleft,
211 div.floatleft {
212 margin: 0 0.5em 0.5em 0;
213 border: 0;
214 }
215
216 .center {
217 text-align: center;
218 }
219
220 /**
221 * Thumbnails
222 */
223 div.thumb {
224 background-color: transparent;
225 width: auto;
226 border: solid 1pt @block-border;
227 }
228
229 div.thumb a {
230 border-bottom: 0;
231 }
232
233 div.thumbinner {
234 background: @block-background;
235 padding: 5px;
236 font-size: 10pt;
237 overflow: hidden;
238 min-width: 100px;
239 }
240
241 html .thumbcaption {
242 text-align: left;
243 line-height: 1.4;
244 padding: 3px;
245 }
246
247 img.thumbborder {
248 border: 1pt solid @block-border;
249 }
250
251 /**
252 * Table rendering
253 */
254 /* Compare `.wikitable` in shared.css */
255 .wikitable,
256 .mw_metadata {
257 background: @content-background;
258 margin: 1em 0;
259 border: 1pt solid @block-border;
260 border-collapse: collapse;
261 font-size: 10pt;
262 }
263
264 .wikitable > caption,
265 .mw_metadata caption {
266 padding: 5px;
267 font-size: 10pt;
268 }
269
270 .wikitable > tr > th,
271 .wikitable > tr > td,
272 .wikitable > * > tr > th,
273 .wikitable > * > tr > td,
274 .mw_metadata th,
275 .mw_metadata td {
276 /* Important is required to override any inline styles provided by editors */
277 background: @content-background !important; /* stylelint-disable-line declaration-no-important */
278 /* We need to also set color in case editors applied a light text color */
279 color: @text !important; /* stylelint-disable-line declaration-no-important */
280 border: 1pt solid @block-border;
281 padding: 0.4em 0.6em;
282 }
283
284 .wikitable > tr > th,
285 .wikitable > * > tr > th,
286 .mw_metadata th {
287 text-align: center;
288 background: #eee !important; /* stylelint-disable-line declaration-no-important */
289 }
290
291 table.listing,
292 table.listing td {
293 border: 1pt solid @block-border;
294 border-collapse: collapse;
295 }