MinervaNeue/resources/skins.minerva.base.styles/images.less
Timo Tijhof 64134bd8a6 Remove minerva.less from global import path
Use local imports instead given all relevant files are within the
same repository, and don't vary by configuraion.

Bug: T140807
Depends-On: If3edac9a35b346af0320c12f70c0d978a6346201
Change-Id: Ife3cc345a63aff452e93accbe0a593fbaa358732
2018-05-29 12:19:00 +00:00

54 lines
1.1 KiB
Plaintext

@import '../../minerva.less/minerva.variables';
@import '../../minerva.less/minerva.mixins';
@import 'mediawiki.mixins.animation';
@animationDuration: 0.3s;
@placeholderBackgroundColor: @grayLightest;
.lazy-image-placeholder {
// If the placeholder itself is inside an inline element do not use block
// See https://phabricator.wikimedia.org/T143558
// and https://phabricator.wikimedia.org/T144567
li &,
span & {
display: inline-block;
}
// The image placeholder for shouldn't show for no-js devices
.client-nojs & {
display: none;
}
background-color: @placeholderBackgroundColor;
// In order to avoid reflows placeholder needs to be inline-block
// Otherwise display block will always take up the full line
// instead of allowing text before and after
// see T146298
display: inline-block;
}
// When the image has loaded transition background color and image opacity
// for a fade-in effect
img.image-lazy-loaded {
.animation( fadeInImage @animationDuration ease-in );
}
@-webkit-keyframes fadeInImage {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeInImage {
from {
opacity: 0;
}
to {
opacity: 1;
}
}