Follow-up 23cfe1bba: harmonize image embedding CSS
[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 #aaa;
14 background-color: #f9f9f9;
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: none;
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 <http://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 /* Ignored by IE7 and lower */
100 .tocnumber:after {
101 content: "";
102 display: inline-block;
103 width: 0.5em;
104 }
105
106 /* Warning */
107 .mw-warning {
108 margin-left: 50px;
109 margin-right: 50px;
110 text-align: center;
111 }
112
113 /* Images */
114 /* @noflip */div.floatright, table.floatright {
115 margin: 0 0 .5em .5em;
116 border: 0;
117 }
118
119 div.floatright p {
120 font-style: italic;
121 }
122
123 /* @noflip */div.floatleft, table.floatleft {
124 margin: 0 .5em .5em 0;
125 border: 0;
126 }
127
128 div.floatleft p {
129 font-style: italic;
130 }
131
132 /* Thumbnails */
133 div.thumb {
134 margin-bottom: .5em;
135 width: auto;
136 background-color: transparent;
137 }
138
139 div.thumbinner {
140 border: 1px solid #ccc;
141 padding: 3px;
142 background-color: #f9f9f9;
143 font-size: 94%;
144 text-align: center;
145 overflow: hidden;
146 }
147
148 html .thumbimage {
149 border: 1px solid #ccc;
150 }
151
152 html .thumbcaption {
153 border: none;
154 line-height: 1.4em;
155 padding: 3px;
156 font-size: 94%;
157 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
158 text-align: left;
159 }
160
161 div.magnify {
162 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
163 float: right;
164 margin-left: 3px;
165 }
166
167 div.magnify a {
168 display: block;
169 /* Hide the text… */
170 text-indent: 15px;
171 white-space: nowrap;
172 overflow: hidden;
173 /* …and replace it with the image */
174 width: 15px;
175 height: 11px;
176 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
177
178 /* Use same SVG support hack as mediawiki.legacy's shared.css */
179 background-image: url(images/magnify-clip-ltr.png);
180 /* @embed */
181 background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
182 /* Don't annoy people who copy-paste everything too much */
183 -moz-user-select: none;
184 -webkit-user-select: none;
185 -ms-user-select: none;
186 user-select: none;
187 }
188
189 img.thumbborder {
190 border: 1px solid #dddddd;
191 }
192
193 /* Directionality-specific styles for thumbnails - their positioning depends on content language */
194
195 /* @noflip */
196 .mw-content-ltr .thumbcaption {
197 text-align: left;
198 }
199
200 /* @noflip */
201 .mw-content-ltr .magnify {
202 float: right;
203 margin-left: 3px;
204 margin-right: 0;
205 }
206
207 /* @noflip */
208 .mw-content-ltr div.magnify a {
209 /* Use same SVG support hack as mediawiki.legacy's shared.css */
210 background-image: url(images/magnify-clip-ltr.png);
211 /* @embed */
212 background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
213 }
214
215 /* @noflip */
216 .mw-content-rtl .thumbcaption {
217 text-align: right;
218 }
219
220 /* @noflip */
221 .mw-content-rtl .magnify {
222 float: left;
223 margin-left: 0;
224 margin-right: 3px;
225 }
226
227 /* @noflip */
228 .mw-content-rtl div.magnify a {
229 /* Use same SVG support hack as mediawiki.legacy's shared.css */
230 background-image: url(images/magnify-clip-rtl.png);
231 /* @embed */
232 background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-rtl.svg);
233 }
234
235 /* @noflip */
236 div.tright {
237 margin: .5em 0 1.3em 1.4em;
238 }
239
240 /* @noflip */
241 div.tleft {
242 margin: .5em 1.4em 1.3em 0;
243 }