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