]>
Commit | Line | Data |
---|---|---|
8cbc40b2 C |
1 | @use 'sass:math'; |
2 | @use '_variables' as *; | |
63c4db6d | 3 | |
26c6ee80 | 4 | @mixin disable-default-a-behaviour { |
931d3430 C |
5 | &:hover, |
6 | &:focus, | |
7 | &:active { | |
26c6ee80 C |
8 | text-decoration: none !important; |
9 | outline: none !important; | |
10 | } | |
11 | } | |
c30745f3 | 12 | |
3ec8dc09 | 13 | @mixin disable-outline { |
e78980eb RK |
14 | &:focus:not(.focus-visible) { |
15 | outline: none; | |
16 | } | |
3ec8dc09 C |
17 | } |
18 | ||
ef80c66c C |
19 | @mixin ellipsis { |
20 | white-space: nowrap; | |
21 | overflow: hidden; | |
22 | text-overflow: ellipsis; | |
23 | } | |
0c9945d9 C |
24 | |
25 | @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) { | |
769ac6c1 RK |
26 | display: block; |
27 | /* Fallback for non-webkit */ | |
931d3430 | 28 | display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */ |
33253c1a | 29 | -webkit-line-clamp: $number-of-lines; |
9fb75b16 | 30 | -webkit-box-orient: vertical; |
769ac6c1 RK |
31 | /* Fallback for non-webkit */ |
32 | font-size: $font-size; | |
8fc02e47 | 33 | line-height: $font-size; |
769ac6c1 RK |
34 | overflow: hidden; |
35 | text-overflow: ellipsis; | |
33253c1a | 36 | max-height: $font-size * $number-of-lines; |
769ac6c1 RK |
37 | } |
38 | ||
9589907c C |
39 | @mixin muted { |
40 | color: pvar(--greyForegroundColor) !important; | |
41 | } | |
42 | ||
60c35932 C |
43 | @mixin fade-text ($fade-after, $background-color) { |
44 | position: relative; | |
45 | overflow: hidden; | |
46 | ||
931d3430 | 47 | &::after { |
60c35932 C |
48 | content: ''; |
49 | pointer-events: none; | |
50 | width: 100%; | |
51 | height: 100%; | |
52 | position: absolute; | |
53 | left: 0; | |
54 | top: 0; | |
55 | background: linear-gradient(transparent $fade-after, $background-color); | |
769ac6c1 RK |
56 | } |
57 | } | |
58 | ||
06ec4bdd | 59 | @mixin peertube-word-wrap ($with-hyphen: true) { |
fc641ded | 60 | word-break: break-word; |
7a14004b C |
61 | word-wrap: break-word; |
62 | overflow-wrap: break-word; | |
06ec4bdd C |
63 | |
64 | @if $with-hyphen { | |
65 | hyphens: auto; | |
66 | } | |
7a14004b C |
67 | } |
68 | ||
457bb213 | 69 | @mixin apply-svg-color ($color) { |
c41c0e28 | 70 | ::ng-deep .feather, |
5351a058 C |
71 | ::ng-deep .material, |
72 | ::ng-deep .misc { | |
c41c0e28 RK |
73 | color: $color; |
74 | } | |
457bb213 C |
75 | } |
76 | ||
d3217560 RK |
77 | @mixin fill-svg-color ($color) { |
78 | ::ng-deep svg { | |
79 | path { | |
80 | fill: $color; | |
81 | } | |
82 | } | |
83 | } | |
84 | ||
a6d5ff76 RK |
85 | @mixin button-focus($color) { |
86 | &:focus, | |
e40afb5b | 87 | &.focus-visible { |
6a4c30de | 88 | box-shadow: #{$focus-box-shadow-form} $color; |
e40afb5b RK |
89 | } |
90 | } | |
91 | ||
c30745f3 | 92 | @mixin peertube-input-text($width) { |
d9a37011 | 93 | padding: 4px 15px; |
c30745f3 | 94 | display: inline-block; |
c30745f3 | 95 | width: $width; |
4c8749cb | 96 | max-width: $width; |
e66883b3 RK |
97 | color: pvar(--inputForegroundColor); |
98 | background-color: pvar(--inputBackgroundColor); | |
a3345972 | 99 | border: 1px solid pvar(--inputBorderColor); |
c30745f3 | 100 | border-radius: 3px; |
5b0ec7cd C |
101 | font-size: $form-input-font-size; |
102 | line-height: $form-input-line-height; | |
9a0fc840 RK |
103 | |
104 | &::placeholder { | |
e66883b3 | 105 | color: pvar(--inputPlaceholderColor); |
9a0fc840 | 106 | } |
2860e62e | 107 | |
767bb14a C |
108 | &[readonly] { |
109 | opacity: 0.7; | |
110 | } | |
111 | ||
5c16e6bc | 112 | @media screen and (max-width: calc(#{$width} + 40px)) { |
2860e62e C |
113 | width: 100%; |
114 | } | |
8a19bee1 | 115 | } |
c30745f3 | 116 | |
5f0805d3 C |
117 | @mixin peertube-textarea ($width, $height) { |
118 | @include peertube-input-text($width); | |
119 | ||
b788e691 C |
120 | color: pvar(--textareaForegroundColor) !important; |
121 | background-color: pvar(--textareaBackgroundColor) !important; | |
5f0805d3 C |
122 | height: $height; |
123 | padding: 5px 15px; | |
5f0805d3 C |
124 | } |
125 | ||
7b272fd7 | 126 | @mixin orange-button { |
e66883b3 | 127 | @include button-focus(pvar(--mainColorLightest)); |
e40afb5b | 128 | |
931d3430 C |
129 | &, |
130 | &:active, | |
131 | &:focus { | |
15a7387d | 132 | color: #fff; |
e66883b3 | 133 | background-color: pvar(--mainColor); |
15a7387d | 134 | } |
7b272fd7 | 135 | |
15a7387d | 136 | &:hover { |
0727cab0 | 137 | color: #fff; |
e66883b3 | 138 | background-color: pvar(--mainHoverColor); |
7b272fd7 | 139 | } |
4cc66133 | 140 | |
931d3430 C |
141 | &[disabled], |
142 | &.disabled { | |
4cc66133 | 143 | cursor: default; |
cadb46d8 | 144 | color: #fff; |
a3345972 | 145 | background-color: pvar(--inputBorderColor); |
4cc66133 | 146 | } |
457bb213 C |
147 | |
148 | my-global-icon { | |
931d3430 | 149 | @include apply-svg-color(#fff); |
457bb213 | 150 | } |
7b272fd7 C |
151 | } |
152 | ||
60c35932 C |
153 | @mixin orange-button-inverted { |
154 | @include button-focus(pvar(--mainColorLightest)); | |
155 | ||
156 | border: 2px solid pvar(--mainColor); | |
733dbc53 | 157 | font-weight: $font-semibold; |
60c35932 | 158 | |
931d3430 C |
159 | &, |
160 | &:active, | |
161 | &:focus { | |
60c35932 C |
162 | color: pvar(--mainColor); |
163 | background-color: pvar(--mainBackgroundColor); | |
164 | } | |
165 | ||
166 | &:hover { | |
167 | color: pvar(--mainColor); | |
168 | background-color: pvar(--mainColorLightest); | |
169 | } | |
170 | ||
931d3430 C |
171 | &[disabled], |
172 | &.disabled { | |
60c35932 C |
173 | cursor: default; |
174 | color: pvar(--mainColor); | |
a3345972 | 175 | background-color: pvar(--inputBorderColor); |
60c35932 C |
176 | } |
177 | ||
178 | my-global-icon { | |
931d3430 | 179 | @include apply-svg-color(pvar(--mainColor)); |
60c35932 C |
180 | } |
181 | } | |
182 | ||
54e78847 | 183 | @mixin tertiary-button { |
a6d5ff76 RK |
184 | @include button-focus($grey-button-outline-color); |
185 | ||
e66883b3 | 186 | color: pvar(--greyForegroundColor); |
54e78847 RK |
187 | background-color: transparent; |
188 | ||
931d3430 C |
189 | &[disabled], |
190 | .disabled { | |
54e78847 RK |
191 | cursor: default; |
192 | } | |
193 | ||
194 | my-global-icon { | |
931d3430 | 195 | @include apply-svg-color(transparent); |
54e78847 RK |
196 | } |
197 | } | |
198 | ||
7b272fd7 | 199 | @mixin grey-button { |
a6d5ff76 | 200 | @include button-focus($grey-button-outline-color); |
26171379 | 201 | |
b788e691 | 202 | background-color: pvar(--greyBackgroundColor); |
1fe1e14c | 203 | color: pvar(--greyForegroundColor); |
7b272fd7 | 204 | |
931d3430 C |
205 | &:hover, |
206 | &:active, | |
207 | &:focus, | |
208 | &[disabled], | |
209 | &.disabled { | |
e66883b3 | 210 | color: pvar(--greyForegroundColor); |
b788e691 | 211 | background-color: pvar(--greySecondaryBackgroundColor); |
7b272fd7 | 212 | } |
4cc66133 | 213 | |
931d3430 C |
214 | &[disabled], |
215 | &.disabled { | |
4cc66133 C |
216 | cursor: default; |
217 | } | |
457bb213 C |
218 | |
219 | my-global-icon { | |
931d3430 | 220 | @include apply-svg-color(pvar(--greyForegroundColor)); |
457bb213 | 221 | } |
7b272fd7 C |
222 | } |
223 | ||
1fe1e14c RK |
224 | @mixin danger-button { |
225 | $color: lighten($color: #c54130, $amount: 10); | |
226 | $text: #fff6f5; | |
227 | ||
228 | @include button-focus(scale-color($color, $alpha: -95%)); | |
931d3430 | 229 | |
1fe1e14c RK |
230 | background-color: $color; |
231 | color: $text; | |
232 | ||
931d3430 C |
233 | &:hover, |
234 | &:active, | |
235 | &:focus, | |
236 | &[disabled], | |
237 | &.disabled { | |
1fe1e14c RK |
238 | background-color: lighten($color: $color, $amount: 10); |
239 | } | |
240 | ||
931d3430 C |
241 | &[disabled], |
242 | &.disabled { | |
1fe1e14c RK |
243 | cursor: default; |
244 | } | |
245 | ||
246 | my-global-icon { | |
931d3430 | 247 | @include apply-svg-color($text); |
1fe1e14c RK |
248 | } |
249 | } | |
250 | ||
c30745f3 | 251 | @mixin peertube-button { |
420a6043 | 252 | padding: 4px 13px; |
27bc9586 | 253 | |
931d3430 | 254 | border: 0; |
c30745f3 | 255 | font-weight: $font-semibold; |
02b2e482 C |
256 | |
257 | // Because of primeng that redefines border-radius of all input[type="..."] | |
266947e5 | 258 | border-radius: 3px !important; |
02b2e482 | 259 | |
c30745f3 | 260 | text-align: center; |
c30745f3 | 261 | cursor: pointer; |
419b520c | 262 | |
5b0ec7cd C |
263 | font-size: $button-font-size; |
264 | ||
419b520c C |
265 | my-global-icon + * { |
266 | @include margin-right(4px); | |
420a6043 | 267 | @include margin-left(4px); |
419b520c | 268 | } |
c30745f3 C |
269 | } |
270 | ||
6f03f944 C |
271 | @mixin peertube-button-big { |
272 | height: auto; | |
273 | padding: 10px 25px; | |
274 | font-size: 18px; | |
275 | line-height: 1.2; | |
276 | border: 0; | |
277 | font-weight: $font-semibold; | |
278 | ||
279 | // Because of primeng that redefines border-radius of all input[type="..."] | |
280 | border-radius: 3px !important; | |
281 | } | |
282 | ||
c30745f3 | 283 | @mixin peertube-button-link { |
c30745f3 | 284 | @include disable-default-a-behaviour; |
ce0e281d | 285 | @include peertube-button; |
2295ce6c | 286 | |
aa0f1963 | 287 | display: inline-block; |
931d3430 | 288 | } |
aa0f1963 | 289 | |
c0e3d9ff C |
290 | @mixin peertube-button-big-link { |
291 | @include disable-default-a-behaviour; | |
292 | @include peertube-button-big; | |
293 | ||
294 | display: inline-block; | |
295 | } | |
296 | ||
931d3430 | 297 | @mixin peertube-button-outline { |
aa0f1963 RK |
298 | @include disable-default-a-behaviour; |
299 | @include peertube-button; | |
300 | ||
931d3430 | 301 | display: inline-block; |
aa0f1963 RK |
302 | border: 1px solid; |
303 | } | |
304 | ||
457bb213 C |
305 | @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) { |
306 | my-global-icon { | |
27bc9586 C |
307 | @include margin-right($margin-right); |
308 | ||
457bb213 C |
309 | position: relative; |
310 | width: $width; | |
457bb213 C |
311 | top: $top; |
312 | } | |
313 | } | |
314 | ||
1ea7da81 | 315 | @mixin peertube-file { |
c5911fd3 C |
316 | position: relative; |
317 | overflow: hidden; | |
318 | display: inline-block; | |
c5911fd3 | 319 | |
c5911fd3 C |
320 | input[type=file] { |
321 | position: absolute; | |
322 | top: 0; | |
323 | right: 0; | |
e61151b0 RK |
324 | width: 100%; |
325 | height: 100%; | |
c5911fd3 | 326 | font-size: 100px; |
27bc9586 | 327 | text-align: end; |
c5911fd3 C |
328 | filter: alpha(opacity=0); |
329 | opacity: 0; | |
330 | outline: none; | |
420a6043 | 331 | background: pvar(--mainBackgroundColor); |
c5911fd3 C |
332 | cursor: inherit; |
333 | display: block; | |
334 | } | |
335 | } | |
336 | ||
1ea7da81 | 337 | @mixin peertube-button-file ($width) { |
1ea7da81 RK |
338 | @include peertube-file; |
339 | @include peertube-button; | |
931d3430 C |
340 | |
341 | width: $width; | |
1ea7da81 RK |
342 | } |
343 | ||
0727cab0 C |
344 | @mixin icon ($size) { |
345 | display: inline-block; | |
346 | background-repeat: no-repeat; | |
347 | background-size: contain; | |
348 | width: $size; | |
349 | height: $size; | |
350 | vertical-align: middle; | |
351 | cursor: pointer; | |
352 | } | |
4cc66133 | 353 | |
d89fcd1e C |
354 | @mixin responsive-width ($width) { |
355 | width: $width; | |
356 | ||
357 | @media screen and (max-width: $width) { | |
358 | width: 100%; | |
359 | } | |
360 | } | |
52c4976f | 361 | |
15a7387d C |
362 | @mixin peertube-select-container ($width) { |
363 | padding: 0; | |
364 | margin: 0; | |
4cc66133 C |
365 | width: $width; |
366 | border-radius: 3px; | |
e66883b3 RK |
367 | color: pvar(--inputForegroundColor); |
368 | background: pvar(--inputBackgroundColor); | |
15a7387d | 369 | position: relative; |
ebe9b6b3 | 370 | height: min-content; |
15a7387d | 371 | |
2f4c784a C |
372 | &.disabled { |
373 | background-color: #E5E5E5; | |
374 | ||
375 | select { | |
376 | cursor: default; | |
377 | } | |
378 | } | |
4c8749cb | 379 | |
8d8a037e JB |
380 | select[disabled] { |
381 | background-color: #f9f9f9; | |
382 | } | |
2f4c784a | 383 | |
2c3abc4f C |
384 | @media screen and (max-width: $width) { |
385 | width: 100%; | |
386 | } | |
387 | ||
931d3430 | 388 | &::after { |
bc4c9cc1 C |
389 | top: 50%; |
390 | right: calc(0% + 15px); | |
391 | content: ' '; | |
392 | height: 0; | |
393 | width: 0; | |
394 | position: absolute; | |
395 | pointer-events: none; | |
396 | border: 5px solid rgba(0, 0, 0, 0); | |
dec437aa | 397 | border-top-color: pvar(--mainForegroundColor); |
bc4c9cc1 C |
398 | margin-top: -2px; |
399 | z-index: 100; | |
15a7387d C |
400 | } |
401 | ||
402 | select { | |
d9a37011 | 403 | padding: 4px 35px 4px 12px; |
15a7387d | 404 | position: relative; |
a3345972 | 405 | border: 1px solid pvar(--inputBorderColor); |
15a7387d C |
406 | background: transparent none; |
407 | appearance: none; | |
108af661 | 408 | text-overflow: ellipsis; |
e66883b3 | 409 | color: pvar(--mainForegroundColor); |
5b0ec7cd C |
410 | font-size: $form-input-font-size; |
411 | line-height: $form-input-line-height; | |
15a7387d C |
412 | |
413 | &:focus { | |
414 | outline: none; | |
415 | } | |
416 | ||
417 | &:-moz-focusring { | |
418 | color: transparent; | |
419 | text-shadow: 0 0 0 #000; | |
420 | } | |
aa879092 C |
421 | |
422 | option { | |
423 | color: #000; | |
4c0b4a08 C |
424 | |
425 | &[value=undefined] { | |
426 | font-weight: $font-semibold; | |
427 | } | |
aa879092 | 428 | } |
15a7387d | 429 | } |
654a188f RK |
430 | |
431 | &.peertube-select-button { | |
432 | @include grey-button; | |
433 | ||
4c0b4a08 | 434 | select { |
654a188f RK |
435 | font-weight: $font-semibold; |
436 | color: pvar(--greyForegroundColor); | |
931d3430 | 437 | border: 0; |
654a188f RK |
438 | } |
439 | } | |
15a7387d C |
440 | } |
441 | ||
dd24f1bb | 442 | // Thanks: https://codepen.io/manabox/pen/raQmpL |
5f0805d3 | 443 | @mixin peertube-radio-container { |
5b0ec7cd C |
444 | label { |
445 | font-size: $form-input-font-size; | |
446 | } | |
447 | ||
dd24f1bb C |
448 | [type=radio]:checked, |
449 | [type=radio]:not(:checked) { | |
450 | position: absolute; | |
e4d9696a C |
451 | opacity: 0; |
452 | cursor: pointer; | |
453 | height: 0; | |
454 | width: 0; | |
dd24f1bb | 455 | } |
5f0805d3 | 456 | |
dd24f1bb C |
457 | [type=radio]:checked + label, |
458 | [type=radio]:not(:checked) + label { | |
459 | position: relative; | |
460 | padding-left: 28px; | |
461 | cursor: pointer; | |
462 | line-height: 20px; | |
463 | display: inline-block; | |
3eb7ee65 | 464 | font-weight: $font-regular; |
dd24f1bb | 465 | } |
5f0805d3 | 466 | |
dd24f1bb C |
467 | [type=radio]:checked + label::before, |
468 | [type=radio]:not(:checked) + label::before { | |
469 | content: ''; | |
470 | position: absolute; | |
471 | left: 0; | |
472 | top: 0; | |
473 | width: 18px; | |
474 | height: 18px; | |
a3345972 | 475 | border: 1px solid pvar(--inputBorderColor); |
dd24f1bb C |
476 | border-radius: 100%; |
477 | background: #fff; | |
478 | } | |
479 | ||
480 | [type=radio]:checked + label::after, | |
481 | [type=radio]:not(:checked) + label::after { | |
482 | content: ''; | |
483 | width: 10px; | |
484 | height: 10px; | |
485 | background: pvar(--mainColor); | |
486 | position: absolute; | |
487 | top: 4px; | |
488 | left: 4px; | |
489 | border-radius: 100%; | |
490 | transition: all 0.2s ease; | |
491 | } | |
492 | [type=radio]:not(:checked) + label::after { | |
493 | opacity: 0; | |
494 | transform: scale(0); | |
495 | } | |
496 | [type=radio]:checked + label::after { | |
497 | opacity: 1; | |
498 | transform: scale(1); | |
5f0805d3 | 499 | } |
3eb7ee65 C |
500 | |
501 | .form-group-description { | |
502 | display: block; | |
1e2fe802 | 503 | margin-top: -7px; |
3eb7ee65 C |
504 | margin-bottom: 10px; |
505 | margin-left: 29px; | |
506 | } | |
5f0805d3 C |
507 | } |
508 | ||
a0d69908 | 509 | @mixin peertube-checkbox ($border-width) { |
1d5342ab | 510 | opacity: 0; |
776ca9b1 | 511 | position: absolute; |
1d5342ab C |
512 | |
513 | &:focus + span { | |
e66883b3 | 514 | box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest); |
1d5342ab | 515 | } |
a0d69908 | 516 | |
931d3430 | 517 | + span { |
a0d69908 C |
518 | position: relative; |
519 | width: 18px; | |
bc20aaed | 520 | min-width: 18px; |
a0d69908 | 521 | height: 18px; |
a3345972 | 522 | border: $border-width solid pvar(--inputBorderColor); |
a0d69908 C |
523 | border-radius: 3px; |
524 | vertical-align: middle; | |
525 | cursor: pointer; | |
526 | ||
931d3430 | 527 | &::after { |
a0d69908 C |
528 | content: ''; |
529 | position: absolute; | |
530 | top: calc(2px - #{$border-width}); | |
531 | left: 5px; | |
532 | width: 5px; | |
533 | height: 12px; | |
534 | opacity: 0; | |
535 | transform: rotate(45deg) scale(0); | |
b4e55614 B |
536 | border-right: 2px solid pvar(--mainBackgroundColor); |
537 | border-bottom: 2px solid pvar(--mainBackgroundColor); | |
a0d69908 C |
538 | } |
539 | } | |
540 | ||
0f7fedc3 | 541 | &:checked + span { |
a0d69908 | 542 | border-color: transparent; |
e66883b3 | 543 | background: pvar(--mainColor); |
a0d69908 C |
544 | animation: jelly 0.6s ease; |
545 | ||
931d3430 | 546 | &::after { |
a0d69908 C |
547 | opacity: 1; |
548 | transform: rotate(45deg) scale(1); | |
549 | } | |
550 | } | |
551 | ||
931d3430 | 552 | + span + span { |
27bc9586 C |
553 | @include margin-left(5px); |
554 | ||
a0d69908 | 555 | font-weight: $font-regular; |
a0d69908 | 556 | cursor: pointer; |
6693df9d | 557 | display: inline; |
a0d69908 | 558 | } |
bbe0f064 | 559 | |
0f7fedc3 | 560 | &[disabled] + span, |
931d3430 | 561 | &[disabled] + span + span { |
bbe0f064 C |
562 | opacity: 0.5; |
563 | cursor: default; | |
564 | } | |
a0d69908 C |
565 | } |
566 | ||
746018f6 C |
567 | @mixin actor-avatar-size ($size) { |
568 | display: inline-block; | |
60c35932 C |
569 | width: $size; |
570 | height: $size; | |
571 | min-width: $size; | |
572 | min-height: $size; | |
573 | } | |
574 | ||
61cbafc1 C |
575 | @mixin actor-counters ($separator-margin: 10px) { |
576 | color: pvar(--greyForegroundColor); | |
61cbafc1 C |
577 | display: flex; |
578 | align-items: center; | |
579 | ||
580 | > *:not(:last-child)::after { | |
581 | content: '•'; | |
582 | margin: 0 $separator-margin; | |
583 | color: pvar(--mainColor); | |
584 | } | |
585 | } | |
586 | ||
0626e7af C |
587 | @mixin in-content-small-title { |
588 | text-transform: uppercase; | |
e66883b3 | 589 | color: pvar(--mainColor); |
0626e7af C |
590 | font-weight: $font-bold; |
591 | font-size: 13px; | |
170726f5 C |
592 | } |
593 | ||
482fa503 RK |
594 | @mixin settings-big-title { |
595 | text-transform: uppercase; | |
e66883b3 | 596 | color: pvar(--mainColor); |
482fa503 | 597 | font-weight: $font-bold; |
5b0ec7cd | 598 | font-size: 1rem; |
482fa503 RK |
599 | margin-bottom: 10px; |
600 | } | |
601 | ||
457bb213 | 602 | @mixin create-button { |
08c1efbe C |
603 | @include peertube-button-link; |
604 | @include orange-button; | |
457bb213 | 605 | @include button-with-icon(20px, 5px, -1px); |
a4f99a76 | 606 | } |
22a16e36 | 607 | |
4beda9e1 | 608 | @mixin row-blocks ($column-responsive: true, $min-height: 130px, $separator: true) { |
22a16e36 | 609 | display: flex; |
4beda9e1 | 610 | min-height: $min-height; |
22a16e36 C |
611 | padding-bottom: 20px; |
612 | margin-bottom: 20px; | |
4beda9e1 C |
613 | |
614 | @if $separator { | |
a3345972 | 615 | border-bottom: 1px solid pvar(--inputBorderColor); |
4beda9e1 | 616 | } |
22a16e36 | 617 | |
0f7407d9 C |
618 | @media screen and (max-width: $small-view) { |
619 | @if $column-responsive { | |
620 | flex-direction: column; | |
621 | height: auto; | |
622 | align-items: center; | |
623 | } @else { | |
624 | min-height: initial; | |
625 | padding-bottom: 10px; | |
626 | margin-bottom: 10px; | |
627 | } | |
22a16e36 | 628 | } |
6aff854c | 629 | } |
c5a1ae50 C |
630 | |
631 | @mixin dropdown-with-icon-item { | |
bc584963 | 632 | padding: 6px 15px; |
c5a1ae50 C |
633 | |
634 | my-global-icon { | |
27bc9586 C |
635 | @include margin-right(10px); |
636 | ||
bc584963 RK |
637 | width: 22px; |
638 | opacity: .7; | |
c5a1ae50 C |
639 | position: relative; |
640 | top: -2px; | |
641 | } | |
642 | } | |
e61151b0 | 643 | |
66927c05 | 644 | @mixin progressbar($small: false) { |
dec437aa | 645 | background-color: pvar(--greyBackgroundColor); |
e61151b0 RK |
646 | display: flex; |
647 | height: 1rem; | |
648 | overflow: hidden; | |
649 | font-size: 0.75rem; | |
650 | border-radius: 0.25rem; | |
bc99dfe5 RK |
651 | position: relative; |
652 | ||
653 | span { | |
654 | position: absolute; | |
dec437aa | 655 | color: pvar(--greyForegroundColor); |
d94b8ecf | 656 | |
66927c05 RK |
657 | @if $small { |
658 | top: -1px; | |
659 | } | |
bc99dfe5 RK |
660 | |
661 | &:nth-of-type(1) { | |
662 | left: .2rem; | |
663 | } | |
664 | &:nth-of-type(2) { | |
665 | right: .2rem; | |
666 | } | |
667 | } | |
e61151b0 RK |
668 | |
669 | .progress-bar { | |
e66883b3 RK |
670 | color: pvar(--mainBackgroundColor); |
671 | background-color: pvar(--mainColor); | |
e61151b0 RK |
672 | display: flex; |
673 | flex-direction: column; | |
674 | justify-content: center; | |
675 | text-align: center; | |
676 | white-space: nowrap; | |
677 | transition: width 0.6s ease; | |
678 | ||
d4132d3f RK |
679 | &.red { |
680 | background-color: lighten($color: #c54130, $amount: 10); | |
681 | } | |
e61151b0 RK |
682 | } |
683 | } | |
76314386 RK |
684 | |
685 | @mixin breadcrumb { | |
686 | display: flex; | |
687 | flex-wrap: wrap; | |
5b0ec7cd | 688 | padding: 0; |
76314386 RK |
689 | margin-bottom: 1rem; |
690 | list-style: none; | |
5b0ec7cd | 691 | font-weight: $font-semibold; |
76314386 RK |
692 | |
693 | .breadcrumb-item { | |
694 | display: flex; | |
695 | ||
696 | a { | |
e66883b3 | 697 | color: pvar(--mainColor); |
76314386 RK |
698 | } |
699 | ||
931d3430 | 700 | + .breadcrumb-item { |
27bc9586 C |
701 | @include padding-left(0.5rem); |
702 | ||
76314386 | 703 | &::before { |
27bc9586 C |
704 | @include padding-right(0.5rem); |
705 | ||
76314386 | 706 | display: inline-block; |
76314386 | 707 | color: #6c757d; |
931d3430 | 708 | content: '/'; |
76314386 RK |
709 | } |
710 | } | |
711 | ||
712 | &.active { | |
713 | color: #6c757d; | |
714 | } | |
715 | } | |
716 | } | |
717 | ||
718 | @mixin dashboard { | |
719 | display: flex; | |
720 | flex-wrap: wrap; | |
721 | margin: 0 -5px; | |
722 | ||
931d3430 | 723 | > div { |
76314386 | 724 | box-sizing: border-box; |
8cbc40b2 | 725 | flex: 0 0 percentage(math.div(1, 3)); |
76314386 RK |
726 | padding: 0 5px; |
727 | margin-bottom: 10px; | |
728 | ||
931d3430 | 729 | > a { |
d1261d9a RK |
730 | @include disable-default-a-behaviour; |
731 | ||
76314386 RK |
732 | text-decoration: none; |
733 | color: inherit; | |
734 | display: block; | |
735 | font-size: 18px; | |
736 | ||
737 | &:active, | |
738 | &:focus, | |
739 | &:hover { | |
740 | opacity: .8; | |
741 | } | |
742 | } | |
743 | ||
931d3430 C |
744 | > a, |
745 | > div { | |
76314386 | 746 | padding: 20px; |
218f730c | 747 | background: pvar(--submenuBackgroundColor); |
76314386 RK |
748 | border-radius: 4px; |
749 | box-sizing: border-box; | |
750 | height: 100%; | |
751 | } | |
752 | } | |
753 | ||
931d3430 C |
754 | .dashboard-num, |
755 | .dashboard-text { | |
76314386 RK |
756 | text-align: center; |
757 | font-size: 130%; | |
e66883b3 | 758 | color: pvar(--mainForegroundColor); |
76314386 RK |
759 | line-height: 30px; |
760 | margin-bottom: 20px; | |
761 | } | |
762 | ||
763 | .dashboard-label { | |
764 | font-size: 90%; | |
e66883b3 | 765 | color: pvar(--inputPlaceholderColor); |
76314386 RK |
766 | text-align: center; |
767 | } | |
768 | } | |
a6d5ff76 | 769 | |
218f730c | 770 | @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) { |
b515c98c RK |
771 | width: 95%; |
772 | border-top: .05rem solid $color; | |
773 | height: .05rem; | |
774 | text-align: center; | |
775 | display: block; | |
776 | position: relative; | |
777 | ||
778 | &[data-content] { | |
779 | margin: .8rem 0; | |
780 | ||
781 | &::after { | |
782 | background: $background; | |
783 | color: $color; | |
784 | content: attr(data-content); | |
785 | display: inline-block; | |
786 | font-size: .7rem; | |
787 | padding: 0 .4rem; | |
788 | transform: translateY(-.65rem); | |
789 | } | |
790 | } | |
791 | } | |
d6af8146 RK |
792 | |
793 | @mixin chip { | |
9589907c | 794 | --avatar-size: 1.2rem; |
d6af8146 | 795 | |
d6af8146 | 796 | display: inline-flex; |
e66883b3 | 797 | color: pvar(--mainForegroundColor); |
9589907c | 798 | height: var(--avatar-size); |
d6af8146 RK |
799 | max-width: 320px; |
800 | overflow: hidden; | |
d6af8146 RK |
801 | text-decoration: none; |
802 | text-overflow: ellipsis; | |
803 | vertical-align: middle; | |
804 | white-space: nowrap; | |
805 | ||
f6e98f0a | 806 | my-actor-avatar { |
27bc9586 | 807 | @include margin-right(.2rem); |
9589907c C |
808 | |
809 | border-radius: 5rem; | |
810 | width: var(--avatar-size); | |
811 | height: var(--avatar-size); | |
d6af8146 RK |
812 | } |
813 | ||
814 | &.two-lines { | |
9589907c | 815 | --avatar-size: 2rem; |
d6af8146 | 816 | |
9589907c C |
817 | font-size: 14px; |
818 | line-height: 1rem; | |
d6af8146 | 819 | |
f6e98f0a | 820 | my-actor-avatar { |
d0800f76 | 821 | display: inline-block; |
d6af8146 RK |
822 | } |
823 | ||
9589907c | 824 | > div { |
d6af8146 RK |
825 | display: flex; |
826 | flex-direction: column; | |
d6af8146 RK |
827 | justify-content: center; |
828 | } | |
829 | } | |
830 | } | |
7a03209d | 831 | |
cdeddff1 C |
832 | // applies ratio (default to 16:9) to a child element (using $selector) only using |
833 | // an immediate's parent size. This allows to set a ratio without explicit | |
e66883b3 | 834 | // dimensions, as width/height cannot be computed from each other. |
8cbc40b2 | 835 | @mixin block-ratio ($selector: 'div', $inverted-ratio: math.div(9, 16)) { |
cdeddff1 C |
836 | $padding-percent: percentage($inverted-ratio); |
837 | ||
e66883b3 RK |
838 | position: relative; |
839 | height: 0; | |
840 | width: 100%; | |
cdeddff1 | 841 | padding-top: $padding-percent; |
e66883b3 RK |
842 | |
843 | #{$selector} { | |
844 | position: absolute; | |
845 | width: 100%; | |
846 | height: 100%; | |
847 | top: 0; | |
37a44fc9 | 848 | |
e66883b3 RK |
849 | @content; |
850 | } | |
851 | } | |
ed5bb517 K |
852 | |
853 | @mixin sub-menu-h1 { | |
854 | ::ng-deep h1 { | |
855 | font-size: 1.3rem; | |
856 | border-bottom: 2px solid $grey-background-color; | |
857 | padding-bottom: 15px; | |
858 | margin-bottom: $sub-menu-margin-bottom; | |
859 | ||
cd262619 | 860 | > span > my-global-icon, |
205e4f56 | 861 | > my-global-icon { |
27bc9586 | 862 | @include margin-right(10px); |
ed5bb517 K |
863 | width: 24px; |
864 | height: 24px; | |
cd262619 | 865 | vertical-align: top; |
ed5bb517 K |
866 | } |
867 | ||
4c8749cb | 868 | .pt-badge { |
27bc9586 | 869 | @include margin-left(7px); |
4c8749cb | 870 | |
cd262619 | 871 | vertical-align: top; |
ed5bb517 K |
872 | } |
873 | } | |
874 | } | |
4572c3d0 C |
875 | |
876 | @mixin play-icon ($width, $height) { | |
877 | width: 0; | |
878 | height: 0; | |
879 | ||
880 | position: absolute; | |
881 | left: 50%; | |
882 | top: 50%; | |
883 | transform: translate(-50%, -50%) scale(0.5); | |
884 | ||
8cbc40b2 C |
885 | border-top: #{math.div($height, 2)} solid transparent; |
886 | border-bottom: #{math.div($height, 2)} solid transparent; | |
4572c3d0 C |
887 | |
888 | border-left: $width solid rgba(255, 255, 255, 0.95); | |
889 | } | |
0f7407d9 C |
890 | |
891 | @mixin on-small-main-col () { | |
892 | :host-context(.main-col:not(.expanded)) { | |
893 | @media screen and (max-width: $small-view + $menu-width) { | |
894 | @content; | |
895 | } | |
896 | } | |
897 | ||
898 | :host-context(.main-col.expanded) { | |
899 | @media screen and (max-width: $small-view) { | |
900 | @content; | |
901 | } | |
902 | } | |
903 | } | |
904 | ||
905 | @mixin on-mobile-main-col () { | |
906 | :host-context(.main-col:not(.expanded)) { | |
907 | @media screen and (max-width: $mobile-view + $menu-width) { | |
908 | @content; | |
909 | } | |
910 | } | |
911 | ||
912 | :host-context(.main-col.expanded) { | |
913 | @media screen and (max-width: $mobile-view) { | |
914 | @content; | |
915 | } | |
916 | } | |
917 | } | |
27bc9586 C |
918 | |
919 | @mixin margin ($block-start, $inline-end, $block-end, $inline-start) { | |
920 | @include margin-left($inline-start); | |
921 | @include margin-right($inline-end); | |
922 | ||
923 | margin-top: $block-start; | |
924 | margin-bottom: $block-end; | |
925 | } | |
926 | ||
927 | @mixin padding ($block-start, $inline-end, $block-end, $inline-start) { | |
928 | @include padding-left($inline-start); | |
929 | @include padding-right($inline-end); | |
930 | ||
931 | padding-top: $block-start; | |
932 | padding-bottom: $block-end; | |
933 | } | |
934 | ||
935 | @mixin margin-left ($value) { | |
936 | @supports (margin-inline-start: $value) { | |
937 | margin-inline-start: $value; | |
938 | } | |
939 | ||
940 | @supports not (margin-inline-start: $value) { | |
941 | margin-left: $value; | |
942 | } | |
943 | } | |
944 | ||
945 | @mixin margin-right ($value) { | |
946 | @supports (margin-inline-end: $value) { | |
947 | margin-inline-end: $value; | |
948 | } | |
949 | ||
950 | @supports not (margin-inline-end: $value) { | |
951 | margin-right: $value; | |
952 | } | |
953 | } | |
954 | ||
955 | @mixin padding-left ($value) { | |
956 | @supports (padding-inline-start: $value) { | |
957 | padding-inline-start: $value; | |
958 | } | |
959 | ||
960 | @supports not (padding-inline-start: $value) { | |
961 | padding-left: $value; | |
962 | } | |
963 | } | |
964 | ||
965 | @mixin padding-right ($value) { | |
966 | @supports (padding-inline-end: $value) { | |
967 | padding-inline-end: $value; | |
968 | } | |
969 | ||
970 | @supports not (padding-inline-end: $value) { | |
971 | padding-right: $value; | |
972 | } | |
973 | } |