Merge "Added release notes for 'ContentHandler::runLegacyHooks' removal"
[mediawiki.git] / resources / src / mediawiki.skinning / content.css
bloba62ef2e457ca3ca1956a0495d0910ed4394eb781
1 /**
2 * MediaWiki style sheet for general styles on complex content
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 */
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%;
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.
23 * We use display:table. Even though it should only contain other table-* display
24 * elements, there are no known problems with using this.
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.
31 #toc,
32 .toc {
33 display: inline-block;
34 display: table;
36 /* IE7 and earlier */
37 zoom: 1;
38 *display: inline;
40 padding: 7px;
43 /* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */
44 table#toc,
45 table.toc {
46 border-collapse: collapse;
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;
55 #toc h2,
56 .toc h2 {
57 display: inline;
58 border: none;
59 padding: 0;
60 font-size: 100%;
61 font-weight: bold;
64 #toc #toctitle,
65 .toc #toctitle,
66 #toc .toctitle,
67 .toc .toctitle {
68 text-align: center;
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;
80 #toc ul ul,
81 .toc ul ul {
82 margin: 0 0 0 2em;
85 /* Separate columns for tocnumber and toctext */
86 /* Ignored by IE7 and lower */
87 .tocnumber,
88 .toctext {
89 display: table-cell;
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.
95 text-decoration: inherit;
98 /* Space between the columns for tocnumber and toctext */
99 .tocnumber {
100 padding-left: 0;
101 padding-right: 0.5em;
102 color: #222;
104 /* @noflip */
105 .mw-content-ltr .tocnumber {
106 padding-left: 0;
107 padding-right: 0.5em;
110 /* @noflip */
111 .mw-content-rtl .tocnumber {
112 padding-left: 0.5em;
113 padding-right: 0;
116 /* Warning */
117 .mw-warning {
118 margin-left: 50px;
119 margin-right: 50px;
120 text-align: center;
123 /* Images */
124 /* @noflip */div.floatright, table.floatright {
125 margin: 0 0 .5em .5em;
126 border: 0;
129 div.floatright p {
130 font-style: italic;
133 /* @noflip */div.floatleft, table.floatleft {
134 margin: 0 .5em .5em 0;
135 border: 0;
138 div.floatleft p {
139 font-style: italic;
142 /* Thumbnails */
143 div.thumb {
144 margin-bottom: .5em;
145 width: auto;
146 background-color: transparent;
149 div.thumbinner {
150 border: 1px solid #c8ccd1;
151 padding: 3px;
152 background-color: #f8f9fa;
153 font-size: 94%;
154 text-align: center;
155 /* new block formatting context,
156 * to clear background from floating content */
157 overflow: hidden;
160 html .thumbimage {
161 background-color: #fff;
162 border: 1px solid #c8ccd1;
165 html .thumbcaption {
166 border: none;
167 line-height: 1.4em;
168 padding: 3px;
169 font-size: 94%;
170 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
171 text-align: left;
174 div.magnify {
175 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
176 float: right;
177 margin-left: 3px;
180 div.magnify a {
181 display: block;
182 /* Hide the text… */
183 text-indent: 15px;
184 white-space: nowrap;
185 overflow: hidden;
186 /* …and replace it with the image */
187 width: 15px;
188 height: 11px;
189 /* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
191 /* Use same SVG support hack as mediawiki.legacy's shared.css */
192 background-image: url( images/magnify-clip-ltr.png );
193 /* @embed */
194 background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
195 /* Don't annoy people who copy-paste everything too much */
196 -moz-user-select: none;
197 -webkit-user-select: none;
198 -ms-user-select: none;
199 user-select: none;
202 img.thumbborder {
203 border: 1px solid #eaecf0;
206 /* Directionality-specific styles for thumbnails - their positioning depends on content language */
208 /* @noflip */
209 .mw-content-ltr .thumbcaption {
210 text-align: left;
213 /* @noflip */
214 .mw-content-ltr .magnify {
215 float: right;
216 margin-left: 3px;
217 margin-right: 0;
220 /* @noflip */
221 .mw-content-ltr div.magnify a {
222 /* Use same SVG support hack as mediawiki.legacy's shared.css */
223 background-image: url( images/magnify-clip-ltr.png );
224 /* @embed */
225 background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
228 /* @noflip */
229 .mw-content-rtl .thumbcaption {
230 text-align: right;
233 /* @noflip */
234 .mw-content-rtl .magnify {
235 float: left;
236 margin-left: 0;
237 margin-right: 3px;
240 /* @noflip */
241 .mw-content-rtl div.magnify a {
242 /* Use same SVG support hack as mediawiki.legacy's shared.css */
243 background-image: url( images/magnify-clip-rtl.png );
244 /* @embed */
245 background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-rtl.svg );
248 /* @noflip */
249 div.tright {
250 margin: .5em 0 1.3em 1.4em;
253 /* @noflip */
254 div.tleft {
255 margin: .5em 1.4em 1.3em 0;
258 /* Hide elements that are marked as "empty" according to legacy Tidy rules,
259 * except if a client script removes the mw-hide-empty-elt class from the body
261 body.mw-hide-empty-elt .mw-empty-elt {
262 display: none;