1 /* stylelint-disable selector-class-pattern */
2 @import 'mediawiki.skin.variables.less';
3 @import 'content.variables.less';
9 figure[ typeof~='mw:File' ],
10 figure[ typeof~='mw:File/Frameless' ] {
12 // The addition of the class is needed for higher specificity
13 // than Vector's print styles
21 margin: @margin-floatright;
30 margin: @margin-floatleft;
43 /* Matches *.center * in element.css */
46 border-collapse: collapse;
51 /* Hide the caption for frameless and plain floated images */
57 figure[ typeof~='mw:File/Thumb' ],
58 figure[ typeof~='mw:File/Frame' ] {
61 border-collapse: collapse;
65 // The addition of the class is needed for higher specificity
66 // than Vector's print styles
72 // Default where page content language is not set
74 margin: @margin-tright;
78 // Defaults for page content language
82 margin: @margin-tright;
91 margin: @margin-tleft;
98 // Override defaults when explicitly set
99 // Order of application is important, so don't combine with the defaults
103 margin: @margin-tright;
112 margin: @margin-tleft;
120 /* Override the default margin from mw-content-xxx above */
122 margin-bottom: @margin-bottom-thumb;
128 /* Override the default margin from mw-content-xxx above
129 * And, matches *.center * in element.css
131 margin: 0 auto @margin-bottom-thumb auto;
136 > :not( figcaption ) {
142 * Broken media get a span instead.
145 display: inline-block;
147 word-break: break-word; // Same as in the figcaption
148 /* This is hardcoded in Linker::makeThumbLink2 for broken media */
150 /* Styles the text of broken media */
151 font-size: @font-size-thumbinner-screen;
156 display: table-caption;
157 caption-side: bottom;
158 line-height: @line-height-thumbcaption;
161 * The "break-word" value is deprecated, however, it's well supported
163 * https://caniuse.com/mdn-css_properties_word-break_break-word
165 * The spec suggests it has the same effect as,
167 * word-break: normal;
168 * overflow-wrap: anywhere;
170 * https://drafts.csswg.org/css-text-3/#word-break-property
172 * So, we should use that. However, support for "anywhere" is lagging
173 * at just 72.39%, with Safari being a notable miss.
174 * https://caniuse.com/mdn-css_properties_overflow-wrap_anywhere
176 * "Soft wrap opportunities introduced by the word break are considered
177 * when calculating min-content intrinsic sizes."
178 * From https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
180 word-break: break-word;
183 /* taken from .thumbcaption, plus .thumbinner */
184 padding: 0 6px 6px 6px;
189 * Disable floating on mobile devices and automatically center on the page.
190 * This overrides any inline styles in the process.
193 body.skin--responsive & {
194 @media all and ( max-width: @max-width-breakpoint-mobile ) {
195 /* stylelint-disable-next-line declaration-no-important */
196 margin: 0 auto !important;
197 /* stylelint-disable-next-line declaration-no-important */
198 float: none !important;
204 // Remove bogus padding from framed images without captions
205 figure[ typeof~='mw:File/Frame' ] > & {
209 // However, it's still necessary for thumbs because the magnifying icon is present
210 figure[ typeof~='mw:File/Thumb' ] > & {
219 .mw-valign-middle & {
220 vertical-align: middle;
223 .mw-valign-baseline & {
224 vertical-align: baseline;
232 vertical-align: super;
239 .mw-valign-text-top & {
240 vertical-align: text-top;
243 .mw-valign-bottom & {
244 vertical-align: bottom;
247 .mw-valign-text-bottom & {
248 vertical-align: text-bottom;