| 1 |
@import 'mediawiki.skin.variables.less'; |
| 2 |
@import '../mmv.variables.less'; |
| 3 |
@import 'mediawiki.mixins.less'; |
| 4 |
@import '../mmv.mixins.less'; |
| 5 |
|
| 6 |
// Common to all buttons |
| 7 |
// We override the codex background and borders to be their forced darkmode variant |
| 8 |
// We use transparency on the background and on the icon color |
| 9 |
// Increase of specificity by class name repeat to avoid rare white boxes, T374373 |
| 10 |
.cdx-button.mw-mmv-button.mw-mmv-button { |
| 11 |
background-color: @buttons-background-color-faded; |
| 12 |
position: fixed; |
| 13 |
z-index: 1003; |
| 14 |
// Cancel out default outline |
| 15 |
border-width: 0; |
| 16 |
outline: 0; |
| 17 |
transition-property: background-color, opacity, border-width, border-color, box-shadow, transform; |
| 18 |
|
| 19 |
&.mw-mmv-dialog-open, /* A button that has opened a dialog */ |
| 20 |
&:active, |
| 21 |
&:hover { |
| 22 |
background-color: @buttons-background-color; |
| 23 |
} |
| 24 |
|
| 25 |
&:focus { |
| 26 |
background-color: @buttons-background-color; |
| 27 |
border-width: 1px; |
| 28 |
} |
| 29 |
|
| 30 |
.mw-mmv-icon { |
| 31 |
// Default transparency of the icon |
| 32 |
opacity: 0.8; |
| 33 |
} |
| 34 |
|
| 35 |
&.mw-mmv-dialog-open, |
| 36 |
&:active, |
| 37 |
&:focus, |
| 38 |
&:hover { |
| 39 |
.mw-mmv-icon { |
| 40 |
transition: opacity 0.1s ease-in; |
| 41 |
opacity: 1; |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
// when the cursor is hidden, the buttons are hidden as well |
| 46 |
.user-inactive & { |
| 47 |
opacity: 0; |
| 48 |
transform: scale( 0 ); |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
// Positioning of buttons |
| 53 |
.mw-mmv-download-button, |
| 54 |
.mw-mmv-reuse-button, |
| 55 |
.mw-mmv-close, |
| 56 |
.mw-mmv-fullscreen { |
| 57 |
right: @buttons-offset-edge; |
| 58 |
left: auto; |
| 59 |
min-width: @buttons-size; |
| 60 |
min-height: @buttons-size; |
| 61 |
} |
| 62 |
|
| 63 |
// Per button positioning and providing icons |
| 64 |
.mw-mmv-close { |
| 65 |
top: @buttons-offset-edge; |
| 66 |
|
| 67 |
.mw-mmv-icon { |
| 68 |
.cdx-mixin-css-icon( @cdx-icon-close, @param-fill-color: @color-inverted-fixed ); |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
.mw-mmv-fullscreen { |
| 73 |
top: ( @buttons-offset-edge + ( @buttons-offset-each ) ); |
| 74 |
|
| 75 |
.mw-mmv-icon { |
| 76 |
.cdx-mixin-css-icon( @cdx-icon-full-screen, @param-fill-color: @color-inverted-fixed ); |
| 77 |
|
| 78 |
.jq-fullscreened & { |
| 79 |
.cdx-mixin-css-icon( @cdx-icon-exit-fullscreen, @param-fill-color: @color-inverted-fixed ); |
| 80 |
} |
| 81 |
} |
| 82 |
} |
| 83 |
|
| 84 |
.mw-mmv-next-image { |
| 85 |
right: @size-icon-medium; |
| 86 |
|
| 87 |
.mw-mmv-icon { |
| 88 |
mask-size: @buttons-icon-size-large; |
| 89 |
.cdx-mixin-css-icon( @cdx-icon-next, @param-fill-color: @color-inverted-fixed, @param-size-icon: @size-icon-medium ); |
| 90 |
} |
| 91 |
} |
| 92 |
|
| 93 |
.mw-mmv-prev-image { |
| 94 |
left: @size-icon-medium; |
| 95 |
|
| 96 |
.mw-mmv-icon { |
| 97 |
mask-size: @buttons-icon-size-large; |
| 98 |
.cdx-mixin-css-icon( @cdx-icon-previous, @param-fill-color: @color-inverted-fixed, @param-size-icon: @size-icon-medium ); |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
.mw-mmv-reuse-button { |
| 103 |
bottom: @buttons-offset-edge + @metadatabar-above-fold-height; |
| 104 |
|
| 105 |
.jq-fullscreened & { |
| 106 |
bottom: @buttons-offset-edge + @progress-bar-height; |
| 107 |
} |
| 108 |
|
| 109 |
.mw-mmv-icon { |
| 110 |
.cdx-mixin-css-icon( @cdx-icon-share, @param-fill-color: @color-inverted-fixed ); |
| 111 |
} |
| 112 |
} |
| 113 |
|
| 114 |
.mw-mmv-download-button { |
| 115 |
bottom: @buttons-offset-edge + @metadatabar-above-fold-height + @buttons-offset-each; |
| 116 |
|
| 117 |
.jq-fullscreened & { |
| 118 |
bottom: @buttons-offset-edge + @progress-bar-height + @buttons-offset-each; |
| 119 |
} |
| 120 |
|
| 121 |
.mw-mmv-icon { |
| 122 |
.cdx-mixin-css-icon( @cdx-icon-download, @param-fill-color: @color-inverted-fixed ); |
| 123 |
} |
| 124 |
} |