a5dd6929651869a6060169a42acbcfbaa2ad6c2f
[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 #toc .toctoggle,
86 .toc .toctoggle {
87 font-size: 94%;
88 }
89
90 /* Separate columns for tocnumber and toctext */
91 /* Ignored by IE7 and lower */
92 .tocnumber,
93 .toctext {
94 display: table-cell;
95 }
96
97 /* Space between the columns for tocnumber and toctext */
98 /* Ignored by IE7 and lower */
99 .tocnumber:after {
100 content: "";
101 padding-right: 0.5em;
102 }
103
104 /* Warning */
105 .mw-warning {
106 margin-left: 50px;
107 margin-right: 50px;
108 text-align: center;
109 }
110
111 /* Images */
112 /* @noflip */div.floatright, table.floatright {
113 margin: 0 0 .5em .5em;
114 border: 0;
115 }
116
117 div.floatright p {
118 font-style: italic;
119 }
120
121 /* @noflip */div.floatleft, table.floatleft {
122 margin: 0 .5em .5em 0;
123 border: 0;
124 }
125
126 div.floatleft p {
127 font-style: italic;
128 }
129
130 /* Thumbnails */
131 div.thumb {
132 margin-bottom: .5em;
133 width: auto;
134 background-color: transparent;
135 }
136
137 div.thumbinner {
138 border: 1px solid #ccc;
139 padding: 3px;
140 background-color: #f9f9f9;
141 font-size: 94%;
142 text-align: center;
143 overflow: hidden;
144 }
145
146 html .thumbimage {
147 border: 1px solid #ccc;
148 }
149
150 html .thumbcaption {
151 border: none;
152 line-height: 1.4em;
153 padding: 3px;
154 font-size: 94%;
155 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
156 text-align: left;
157 }
158
159 div.magnify {
160 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
161 float: right;
162 margin-left: 3px;
163 }
164
165 div.magnify a {
166 display: block;
167 /* Hide the text… */
168 text-indent: 15px;
169 white-space: nowrap;
170 overflow: hidden;
171 /* …and replace it with the image */
172 width: 15px;
173 height: 11px;
174 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
175
176 /* Use same SVG support hack as mediawiki.legacy's shared.css */
177 background-image: url(images/magnify-clip-ltr.png);
178 /* @embed */
179 background-image: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
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: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
213 /* @embed */
214 background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
215 }
216
217 /* @noflip */
218 .mw-content-rtl .thumbcaption {
219 text-align: right;
220 }
221
222 /* @noflip */
223 .mw-content-rtl .magnify {
224 float: left;
225 margin-left: 0;
226 margin-right: 3px;
227 }
228
229 /* @noflip */
230 .mw-content-rtl div.magnify a {
231 /* Use same SVG support hack as mediawiki.legacy's shared.css */
232 background-image: url(images/magnify-clip-rtl.png);
233 /* @embed */
234 background-image: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-rtl.svg);
235 /* @embed */
236 background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-rtl.svg);
237 }
238
239 /* @noflip */
240 div.tright {
241 margin: .5em 0 1.3em 1.4em;
242 }
243
244 /* @noflip */
245 div.tleft {
246 margin: .5em 1.4em 1.3em 0;
247 }