mediawiki-skins-MinervaNeue/resources/skins.minerva.options/backtotop.less
jdlrobson cbad0bd363 Merge skin option modules into a single ResourceLoader module and move enabled logic to client
It's presumed that skin options will eventually become the default or be removed from the skin.
While they are not the default, it would be helpful to package them in one single module - as ResourceLoader
modules are costly bloating the dependency graph in the MediaWiki startup module.

In T167713 we talked about grouping our entry points by page rather than feature, which this seems consistent
with. A page with special options enabled is different from a page without.

Change-Id: Id948f913d4743532ba3442d2059a03c122419ff2
2018-10-12 10:18:21 -07:00

48 lines
935 B
Plaintext

@import '../../minerva.less/minerva.variables';
@import 'mediawiki.mixins.less';
.backtotop {
/* initially hide the element */
visibility: hidden;
opacity: 0;
/* basic styling */
position: fixed;
width: 2.5em;
height: 2.5em;
border-radius: 100%;
box-shadow: 0.1em 0.2em 0.3em @colorGray12;
bottom: 20px;
right: 0;
cursor: pointer;
z-index: @z-indexOverlay;
background-color: @colorProgressive;
/* define what happens, if the visible class is added/removed, add a nice fade out/in */
.transition( opacity 0.5s 0s );
&.visible {
&:hover {
opacity: 1;
}
opacity: 0.8;
}
> .arrow-up {
width: 0;
height: 0;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
}
/* center arrow in RTL wikis */
.rtl > & .arrow-up {
transform: translate( 50%, -50% );
}
}