Debian Codegraph @

extensions/MultimediaViewer/resources/mmv/ui/mmv.ui.metadataPanel.less

raw
1 @import 'mediawiki.skin.variables.less';
2 @import '../mmv.variables.less';
3 @import '../mmv.mixins.less';
4
5 @panel-below-fold-background-color: @background-color-interactive-subtle;
6
7 @vertical-padding: 10px;
8 @horizontal-padding: 20px;
9 @space-above-credit: 2px;
10
11 .mw-mmv-info-box {
12 display: inline-block;
13 overflow: hidden;
14 border: 1px solid @border-color-muted;
15 border-radius: @border-radius-base;
16 background-color: @background-color-interactive-subtle;
17 }
18
19 .mw-mmv-title-contain {
20 position: relative;
21 }
22
23 .mw-mmv-title-para {
24 @height: @metadatabar-above-fold-inner-height - 2 * @vertical-padding; // needs explicit height for text truncation logic
25 margin: 0 0 @vertical-padding; // use margin instead of padding for bottom so text is not visible
26 padding: @vertical-padding @horizontal-padding 0 @horizontal-padding;
27 height: @height;
28 line-height: @height;
29
30 &.mw-mmv-ttf-normal {
31 font-size: 20px;
32 }
33
34 &.mw-mmv-title-small {
35 font-size: 18px;
36 }
37
38 &.mw-mmv-title-smaller {
39 @vertical-padding: 6px;
40 @height: @metadatabar-above-fold-inner-height - 2 * @vertical-padding;
41 height: @height;
42 margin: 0 0 @horizontal-padding;
43 padding: @vertical-padding @horizontal-padding 0 @horizontal-padding;
44 line-height: floor( @height / 2 ); // two lines
45 font-size: 16px;
46 }
47
48 // this should be after the size-specific styles so it can override any height set there
49 &.mw-mmv-ttf-untruncated {
50 height: auto;
51 }
52
53 .mw-mmv-ttf-ellipsis {
54 right: @horizontal-padding;
55 bottom: 3px;
56
57 &::before {
58 .fade-out-horizontal( @panel-above-fold-background-color );
59 }
60 }
61 }
62
63 .mw-mmv-credit {
64 @padding-right: 5px;
65 margin: 0;
66 color: @color-subtle;
67 padding: 0 0 @padding-right;
68 font-size: 0.85em;
69
70 .metadata-panel-is-closed {
71 height: @metadatabar-below-fold-pushup-height - @space-above-credit - @border-width-base; // needs explicit height for text truncation logic
72 line-height: @metadatabar-below-fold-pushup-height - @space-above-credit - @border-width-base;
73 }
74
75 &.empty {
76 height: 0.85em;
77 }
78
79 .mw-mmv-ttf-ellipsis {
80 right: @padding-right;
81 bottom: 13px;
82 background-color: @panel-below-fold-background-color; // clip text
83
84 &::before {
85 .fade-out-horizontal( @panel-below-fold-background-color );
86 }
87 }
88 }
89
90 .mw-mmv-source-author {
91 line-height: 1.8em;
92 }
93
94 .mw-mmv-title {
95 // this element is the click target for text untruncation; with the default display:inline it would be an
96 // inline box which can have "gaps" between the lines, making clicks seem to have no effect
97 display: inline-block;
98 }
99
100 .mw-mmv-image-metadata {
101 width: 100%;
102 position: relative;
103 margin-top: -@metadatabar-below-fold-pushup-height;
104 border-top: 1px solid @border-color-muted;
105 background-color: @panel-below-fold-background-color;
106 padding-top: @space-above-credit;
107
108 .jq-fullscreened & {
109 // Make sure content fits into the screen. This assumes no paddings.
110 height: @metadatabar-below-fold-pushup-height - @border-width-base - @space-above-credit;
111 overflow: hidden;
112 }
113
114 .jq-fullscreened .mw-mmv-untruncated & {
115 height: auto;
116 }
117 }
118
119 .mw-mmv-author::before {
120 .cdx-mixin-css-icon( @cdx-icon-user-avatar, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
121 content: ' ';
122 margin-right: @spacing-50;
123 }
124
125 .mw-mmv-image-desc-div {
126 overflow-y: auto;
127 max-height: 150px;
128 margin-bottom: 15px;
129
130 &.empty {
131 display: none;
132 }
133 }
134
135 .mw-mmv-image-desc-div,
136 .mw-mmv-image-links-div {
137 display: inline-block;
138 vertical-align: top;
139 }
140
141 @littlefont: 0.85em;
142 @mediumfont: 0.95em;
143
144 .mw-mmv-image-desc {
145 font-size: @mediumfont;
146 color: @color-subtle;
147 }
148
149 .mw-mmv-image-links {
150 margin: 0 20px;
151 word-break: break-word;
152 line-height: 1.5;
153
154 li {
155 list-style: none;
156 font-size: @littlefont;
157
158 &.empty {
159 display: none;
160 }
161
162 // Make sure the next list item is not visible when the
163 // metadata panel is closed
164 .metadata-panel-is-closed &.mw-mmv-license-li {
165 height: @metadatabar-below-fold-pushup-height - @space-above-credit;
166 line-height: @metadatabar-below-fold-pushup-height - @space-above-credit;
167 }
168
169 &::before {
170 content: ' ';
171 margin-right: @spacing-50;
172 }
173
174 &.mw-mmv-license-li::before {
175 .cdx-mixin-css-icon( @cdx-icon-lock, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
176 }
177
178 &.mw-mmv-license-li.cc-license::before {
179 .cdx-mixin-css-icon( @cdx-icon-logo-c-c, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
180 }
181
182 &.mw-mmv-license-li.pd-license::before {
183 .cdx-mixin-css-icon( @cdx-icon-un-lock, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
184 }
185
186 &.mw-mmv-filename-li::before {
187 .cdx-mixin-css-icon( @cdx-icon-image, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
188 }
189
190 &.mw-mmv-datetime-li::before {
191 .cdx-mixin-css-icon( @cdx-icon-clock, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
192 }
193
194 &.mw-mmv-location-li::before {
195 .cdx-mixin-css-icon( @cdx-icon-map-pin, @param-fill-color: @color-subtle, @param-size-icon: @size-icon-small );
196 }
197
198 &.empty::before {
199 background-image: none !important; /* stylelint-disable-line declaration-no-important */
200 }
201 }
202 }
203
204 .mw-mmv-license-contain,
205 .mw-mmv-license {
206 text-align: right;
207 }
208
209 .mw-mmv-filename-prefix {
210 padding-right: 4px;
211 cursor: text;
212 }
213
214 .mw-mmv-title-para,
215 .mw-mmv-credit,
216 .mw-mmv-image-desc {
217 padding-left: @horizontal-padding;
218 }
219
220 .mw-mmv-label {
221 background-color: @background-color-interactive;
222 color: @color-base;
223 margin-left: 6px;
224 margin-top: 1px;
225 border-radius: @border-radius-base;
226 padding: 2px 5px;
227 font-size: 0.9em;
228
229 &:hover {
230 background-color: @background-color-interactive-subtle;
231 }
232 }
233
234 .mw-mmv-image-metadata-column {
235 float: left;
236 }
237
238 .mw-mmv-image-metadata-desc-column {
239 width: 66.5%;
240 }
241
242 .mw-mmv-image-metadata-links-column {
243 max-width: 33.5%;
244 width: 25%;
245 text-align: right;
246 float: right;
247 transition: width 0.2s ease-out;
248
249 .mw-mmv-untruncated & {
250 width: 33.5%;
251 text-align: left;
252 }
253 }
254
255 .mw-mmv-restrictions {
256 display: inline-block;
257 line-height: 14px;
258 }
259
260 .mw-mmv-restriction-label {
261 cursor: default;
262 display: inline-block;
263 height: 16px;
264
265 &,
266 &:hover {
267 background-color: @background-color-warning-subtle;
268 border: 1px solid @border-color-warning;
269 }
270 }
271
272 .mw-mmv-restriction-label-inner {
273 display: inline-block;
274 width: 14px;
275 height: 14px;
276 text-indent: -9999px;
277 text-align: left;
278 background-size: contain;
279
280 &::after {
281 float: right;
282 text-indent: 0;
283 }
284 }
285
286 .mw-mmv-permission-link {
287 cursor: pointer;
288
289 .jq-fullscreened & {
290 display: none;
291 }
292 }
293
294 .mw-mmv-optout-link.pending {
295 cursor: wait;
296 color: @color-subtle;
297 }