| 1 |
@import 'mediawiki.skin.variables.less'; |
| 2 |
@import 'mediawiki.mixins.less'; |
| 3 |
@import '../mmv.variables.less'; |
| 4 |
@import '../mmv.mixins.less'; |
| 5 |
|
| 6 |
.mw-mmv-ttf-container { |
| 7 |
position: relative; |
| 8 |
overflow: hidden; // need to create a block formatting context, otherwise adjacent floats would be problematic |
| 9 |
|
| 10 |
&.mw-mmv-ttf-small { |
| 11 |
font-size: 90%; |
| 12 |
} |
| 13 |
|
| 14 |
&.mw-mmv-ttf-smaller { |
| 15 |
font-size: 80%; |
| 16 |
} |
| 17 |
|
| 18 |
&.mw-mmv-ttf-smallest { |
| 19 |
font-size: 65%; |
| 20 |
} |
| 21 |
|
| 22 |
// used on containers which have been shortened and can be expanded |
| 23 |
&.mw-mmv-ttf-truncated { |
| 24 |
cursor: pointer; |
| 25 |
} |
| 26 |
|
| 27 |
// used on containers which have been expanded |
| 28 |
&.mw-mmv-ttf-untruncated { |
| 29 |
height: auto; |
| 30 |
} |
| 31 |
|
| 32 |
.mw-mmv-ttf-ellipsis { |
| 33 |
display: block; |
| 34 |
position: absolute; |
| 35 |
right: 0; |
| 36 |
bottom: 0; |
| 37 |
height: 1em; // make it scale with the font |
| 38 |
width: 1.5em; // SVG image has ~1.5 aspect ratio |
| 39 |
text-indent: -9999px; |
| 40 |
border-radius: @border-radius-base; |
| 41 |
background-size: contain; |
| 42 |
background-position: center center; |
| 43 |
background-repeat: no-repeat; |
| 44 |
.cdx-mixin-css-icon( @cdx-icon-ellipsis, @param-fill-color: @color-base ); |
| 45 |
box-shadow: -4px 6px 0 0 @box-shadow-color-inverted; |
| 46 |
opacity: 0.5; |
| 47 |
|
| 48 |
// Hovering over .mw-mmv-ttf-ellipsis-container will make the ellipsis more visible to attract |
| 49 |
// attention to it. Since it has to be set on a parent element which is not under control of |
| 50 |
// TruncatableTextField, setting it is the caller's responsibility. |
| 51 |
.mw-mmv-ttf-ellipsis-container:hover & { |
| 52 |
opacity: 0.75; |
| 53 |
} |
| 54 |
|
| 55 |
// second rule + ordering needed for specificity |
| 56 |
&:hover, |
| 57 |
.mw-mmv-ttf-ellipsis-container &:hover { |
| 58 |
opacity: 1; |
| 59 |
} |
| 60 |
|
| 61 |
&::before { |
| 62 |
@fade-length: 2em; |
| 63 |
display: block; |
| 64 |
content: ''; |
| 65 |
height: 1.6em; // 1em would not cover high glyphs |
| 66 |
width: @fade-length; |
| 67 |
margin-left: -@fade-length; |
| 68 |
.fade-out-horizontal(); |
| 69 |
} |
| 70 |
} |
| 71 |
} |