2cf2cb7a45d198cc46b7f8de21214929ee8171db
[lhc/web/wiklou.git] / resources / src / mediawiki.skinning / content.css
1 /**
2 * MediaWiki style sheet for general styles on complex content
3 *
4 * Styles for complex things which are a standard part of page content
5 * (ie: the CSS classing built into the system), like the TOC.
6 */
7
8 /* Table of Contents */
9 #toc,
10 .toc,
11 .mw-warning,
12 .toccolours {
13 border: 1px solid #a2a9b1;
14 background-color: #f8f9fa;
15 padding: 5px;
16 font-size: 95%;
17 }
18
19 /**
20 * We want to display the ToC element with intrinsic width in block mode. The fit-content
21 * value for width is however not supported by large groups of browsers.
22 *
23 * We use display:table. Even though it should only contain other table-* display
24 * elements, there are no known problems with using this.
25 *
26 * Because IE < 8 and other older browsers don't support display:table, we fallback to
27 * using inline-block mode, which features at least intrinsic width, but won't clear preceding
28 * inline elements. In practice inline elements surrounding the TOC are uncommon enough that
29 * this is an acceptable sacrifice.
30 */
31 #toc,
32 .toc {
33 display: inline-block;
34 display: table;
35
36 /* IE7 and earlier */
37 zoom: 1;
38 *display: inline;
39
40 padding: 7px;
41 }
42
43 /* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */
44 table#toc,
45 table.toc {
46 border-collapse: collapse;
47 }
48
49 /* Remove additional paddings inside table-cells that are not present in <div>s */
50 table#toc td,
51 table.toc td {
52 padding: 0;
53 }
54
55 #toc h2,
56 .toc h2 {
57 display: inline;
58 border: 0;
59 padding: 0;
60 font-size: 100%;
61 font-weight: bold;
62 }
63
64 #toc #toctitle,
65 .toc #toctitle,
66 #toc .toctitle,
67 .toc .toctitle {
68 text-align: center;
69 }
70
71 #toc ul,
72 .toc ul {
73 list-style-type: none;
74 list-style-image: none;
75 margin-left: 0;
76 padding: 0;
77 text-align: left;
78 }
79
80 #toc ul ul,
81 .toc ul ul {
82 margin: 0 0 0 2em;
83 }
84
85 /* Separate columns for tocnumber and toctext */
86 /* Ignored by IE7 and lower */
87 .tocnumber,
88 .toctext {
89 display: table-cell;
90 /*
91 Text decorations are not propagated to the contents of inline blocks and inline tables,
92 according to <https://www.w3.org/TR/css-text-decor-3/#line-decoration>, and 'display: table-cell'
93 generates an inline table when used without any parent table-rows and tables.
94 */
95 text-decoration: inherit;
96 }
97
98 /* Space between the columns for tocnumber and toctext */
99 .tocnumber {
100 padding-left: 0;
101 padding-right: 0.5em;
102 color: #222;
103 }
104 /* @noflip */
105 .mw-content-ltr .tocnumber {
106 padding-left: 0;
107 padding-right: 0.5em;
108 }
109
110 /* @noflip */
111 .mw-content-rtl .tocnumber {
112 padding-left: 0.5em;
113 padding-right: 0;
114 }
115
116 /* Warning */
117 .mw-warning {
118 margin-left: 50px;
119 margin-right: 50px;
120 text-align: center;
121 }
122
123 /* Images */
124 /* @noflip */div.floatright, table.floatright {
125 margin: 0 0 .5em .5em;
126 }
127
128 div.floatright p {
129 font-style: italic;
130 }
131
132 /* @noflip */div.floatleft, table.floatleft {
133 margin: 0 .5em .5em 0;
134 }
135
136 div.floatleft p {
137 font-style: italic;
138 }
139
140 /* Thumbnails */
141 div.thumb {
142 margin-bottom: .5em;
143 width: auto;
144 background-color: transparent;
145 }
146
147 div.thumbinner {
148 border: 1px solid #c8ccd1;
149 padding: 3px;
150 background-color: #f8f9fa;
151 font-size: 94%;
152 text-align: center;
153 /* new block formatting context,
154 * to clear background from floating content */
155 overflow: hidden;
156 }
157
158 html .thumbimage {
159 background-color: #fff;
160 border: 1px solid #c8ccd1;
161 }
162
163 html .thumbcaption {
164 border: 0;
165 line-height: 1.4em;
166 padding: 3px;
167 font-size: 94%;
168 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
169 text-align: left;
170 }
171
172 div.magnify {
173 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
174 float: right;
175 margin-left: 3px;
176 }
177
178 div.magnify a {
179 display: block;
180 /* Hide the text… */
181 text-indent: 15px;
182 white-space: nowrap;
183 overflow: hidden;
184 /* …and replace it with the image */
185 width: 15px;
186 height: 11px;
187 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
188
189 /* Use same SVG support hack as mediawiki.legacy's shared.css */
190 background-image: url( images/magnify-clip-ltr.png );
191 /* @embed */
192 background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
193 /* Don't annoy people who copy-paste everything too much */
194 -moz-user-select: none;
195 -webkit-user-select: none;
196 -ms-user-select: none;
197 user-select: none;
198 }
199
200 img.thumbborder {
201 border: 1px solid #eaecf0;
202 }
203
204 /* Directionality-specific styles for thumbnails - their positioning depends on content language */
205
206 /* @noflip */
207 .mw-content-ltr .thumbcaption {
208 text-align: left;
209 }
210
211 /* @noflip */
212 .mw-content-ltr .magnify {
213 float: right;
214 margin-left: 3px;
215 margin-right: 0;
216 }
217
218 /* @noflip */
219 .mw-content-ltr div.magnify a {
220 /* Use same SVG support hack as mediawiki.legacy's shared.css */
221 background-image: url( images/magnify-clip-ltr.png );
222 /* @embed */
223 background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
224 }
225
226 /* @noflip */
227 .mw-content-rtl .thumbcaption {
228 text-align: right;
229 }
230
231 /* @noflip */
232 .mw-content-rtl .magnify {
233 float: left;
234 margin-left: 0;
235 margin-right: 3px;
236 }
237
238 /* @noflip */
239 .mw-content-rtl div.magnify a {
240 /* Use same SVG support hack as mediawiki.legacy's shared.css */
241 background-image: url( images/magnify-clip-rtl.png );
242 /* @embed */
243 background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-rtl.svg );
244 }
245
246 /* @noflip */
247 div.tright {
248 margin: .5em 0 1.3em 1.4em;
249 }
250
251 /* @noflip */
252 div.tleft {
253 margin: .5em 1.4em 1.3em 0;
254 }
255
256 /* Hide elements that are marked as "empty" according to legacy Tidy rules,
257 * except if a client script removes the mw-hide-empty-elt class from the body
258 */
259 body.mw-hide-empty-elt .mw-empty-elt {
260 display: none;
261 }