2017-07-12 15:12:40 +00:00
|
|
|
// Full-size images
|
|
|
|
//
|
|
|
|
// Inline and floated full-size images will be styled like so.
|
|
|
|
//
|
|
|
|
// Example wikitext:
|
|
|
|
// This is an [[File:Book.png]] inline image.
|
|
|
|
// [[File:Book.png|left]]Left-aligned image
|
|
|
|
// [[File:Book.png|right]]Right-aligned image
|
|
|
|
//
|
|
|
|
// Markup:
|
|
|
|
// <div class="content">
|
|
|
|
// <p>This is an <img src="images/arrow-left.png"> inline image.</p>
|
|
|
|
// <div class="floatleft"><img src="images/arrow-left.png">Left-aligned image</div>
|
|
|
|
// <div class="floatright"><img src="images/arrow-left.png">Right-aligned image</div>
|
|
|
|
// </div>
|
|
|
|
@import 'mediawiki.mixins.less';
|
2021-04-29 01:01:54 +00:00
|
|
|
@import '../../../minerva.less/minerva.variables.less';
|
|
|
|
@import '../../../minerva.less/minerva.mixins.less';
|
2017-07-12 15:12:40 +00:00
|
|
|
|
|
|
|
.content {
|
|
|
|
img {
|
|
|
|
// Matches commonElements.css
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Applied to divs containing aligned, full-size images
|
|
|
|
.floatright {
|
|
|
|
/* @noflip */
|
|
|
|
clear: right;
|
|
|
|
/* @noflip */
|
|
|
|
float: right;
|
|
|
|
/* @noflip */
|
|
|
|
margin: 0 0 0.6em 0.6em;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Applied to divs containing aligned, full-size images
|
|
|
|
.floatleft {
|
|
|
|
/* @noflip */
|
|
|
|
clear: left;
|
|
|
|
/* @noflip */
|
|
|
|
float: left;
|
|
|
|
/* @noflip */
|
|
|
|
margin: 0 0.6em 0.6em 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Prevent inline styles on images in wikitext
|
|
|
|
// Note we restrict to img's to avoid conflicts with VisualEditor shields
|
|
|
|
// See bug T64460
|
2020-01-27 20:42:37 +00:00
|
|
|
// due to lazy loading images we also must consider imgs inside noscript tags (T191893)
|
2018-04-23 20:42:31 +00:00
|
|
|
a > img,
|
2018-11-17 02:32:35 +00:00
|
|
|
noscript > img {
|
2017-07-12 15:12:40 +00:00
|
|
|
// make sure that images in articles don't cause a horizontal scrollbar
|
|
|
|
// on small screens
|
|
|
|
max-width: 100% !important;
|
2018-04-30 17:51:09 +00:00
|
|
|
|
2020-08-14 07:03:46 +00:00
|
|
|
// Note height auto is only applied to images. Not neeed for the lazy-image-placeholder which is
|
|
|
|
// a gray box and will cause reflows.
|
2017-07-12 15:12:40 +00:00
|
|
|
height: auto !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
// bug T22030
|
|
|
|
.noresize {
|
|
|
|
max-width: 100%;
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
|
|
a > img {
|
|
|
|
max-width: none !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|