mediawiki-extensions-Multim.../resources/mmv/ui/mmv.ui.truncatableTextField.less
Gergő Tisza af508f066a Make the ellipsis of truncated texts more prominent
Also fixes popup texts which should have been updated in the parent commit
and the panel opening mechanism which did not work when the below-the-fold
description box was display:none-d.

Change-Id: I5fc37429a7dc7a8f1517fa42375cd140d7d11674
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
2014-11-11 15:37:14 +00:00

74 lines
1.8 KiB
Plaintext

@import "../mmv.mixins";
.mw-mmv-ttf-container {
position: relative;
overflow: hidden; // need to create a block formatting context, otherwise adjacent floats would be problematic
&.mw-mmv-ttf-small {
font-size: 90%;
}
&.mw-mmv-ttf-smaller {
font-size: 80%;
}
&.mw-mmv-ttf-smallest {
font-size: 65%;
}
// used on containers which have been shortened and can be expanded
&.mw-mmv-ttf-truncated {
cursor: pointer;
}
// used on containers which have been expanded
&.mw-mmv-ttf-untruncated {
height: auto;
}
.mw-mmv-ttf-ellipsis {
display: block;
position: absolute;
right: 0;
bottom: 0;
height: 1em; // make it scale with the font
width: 1.5em; // SVG image has ~1.5 aspect ratio
text-indent: -9999px;
border-radius: 2px;
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
/* @embed */
background-image: url(img/ellipsis_lightgray.svg);
// Hovering over .mw-mmv-ttf-ellipsis-container will make the ellipsis more visible to attract
// attention to it. Since it has to be set on a parent element which is not under control of
// TruncatableTextField, setting it is the caller's responsibility.
.mw-mmv-ttf-ellipsis-container:hover & {
background-color: #d7d7d7;
/* @embed */
background-image: url(img/ellipsis_gray.svg);
}
// second rule + ordering needed for specificity
&:hover, .mw-mmv-ttf-ellipsis-container &:hover {
background-color: #cacaca;
/* @embed */
background-image: url(img/ellipsis_darkgray.svg);
}
&:before {
@fade-length: 2em;
display: block;
content: '';
height: 1.2em; // 1em would not cover high glyphs
margin-top: -0.1em; // center
width: @fade-length;
margin-left: -@fade-length;
.fade-out-horizontal();
}
}
}