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