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