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