3 @mixin disable-default-a-behaviour {
7 text-decoration: none !important;
8 outline: none !important;
12 @mixin disable-outline {
13 &:focus:not(.focus-visible) {
21 text-overflow: ellipsis;
24 @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) {
26 /* Fallback for non-webkit */
27 display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */
28 -webkit-line-clamp: $number-of-lines;
29 /* Fallback for non-webkit */
30 font-size: $font-size;
31 line-height: $font-size;
33 text-overflow: ellipsis;
34 max-height: $font-size * $number-of-lines;
37 @mixin fade-text ($fade-after, $background-color) {
49 background: linear-gradient(transparent $fade-after, $background-color);
53 @mixin peertube-word-wrap ($with-hyphen: true) {
54 word-break: break-word;
55 word-wrap: break-word;
56 overflow-wrap: break-word;
63 @mixin apply-svg-color ($color) {
70 @mixin fill-svg-color ($color) {
78 @mixin button-focus($color) {
81 box-shadow: #{$focus-box-shadow-form} $color;
85 @mixin peertube-input-text($width) {
86 display: inline-block;
87 height: $button-height;
89 color: pvar(--inputForegroundColor);
90 background-color: pvar(--inputBackgroundColor);
91 border: 1px solid #C6C6C6;
98 color: pvar(--inputPlaceholderColor);
105 @media screen and (max-width: $width) {
110 @mixin peertube-input-group($width) {
112 min-height: $button-height;
123 @mixin peertube-textarea ($width, $height) {
124 @include peertube-input-text($width);
126 color: pvar(--textareaForegroundColor);
127 background-color: pvar(--textareaBackgroundColor);
133 @mixin orange-button {
134 @include button-focus(pvar(--mainColorLightest));
140 background-color: pvar(--mainColor);
145 background-color: pvar(--mainHoverColor);
152 background-color: #C6C6C6;
156 @include apply-svg-color(#fff);
160 @mixin orange-button-inverted {
161 @include button-focus(pvar(--mainColorLightest));
163 border: 2px solid pvar(--mainColor);
164 font-weight: $font-semibold;
169 color: pvar(--mainColor);
170 background-color: pvar(--mainBackgroundColor);
174 color: pvar(--mainColor);
175 background-color: pvar(--mainColorLightest);
181 color: pvar(--mainColor);
182 background-color: #C6C6C6;
186 @include apply-svg-color(pvar(--mainColor));
190 @mixin tertiary-button {
191 @include button-focus($grey-button-outline-color);
193 color: pvar(--greyForegroundColor);
194 background-color: transparent;
202 @include apply-svg-color(transparent);
207 @include button-focus($grey-button-outline-color);
209 background-color: $grey-background-color;
210 color: pvar(--greyForegroundColor);
217 color: pvar(--greyForegroundColor);
218 background-color: $grey-background-hover-color;
227 @include apply-svg-color(pvar(--greyForegroundColor));
231 @mixin danger-button {
232 $color: lighten($color: #c54130, $amount: 10);
235 @include button-focus(scale-color($color, $alpha: -95%));
237 background-color: $color;
245 background-color: lighten($color: $color, $amount: 10);
254 @include apply-svg-color($text);
258 @mixin peertube-button {
260 font-weight: $font-semibold;
262 height: $button-height;
263 line-height: $button-height;
264 // FIXME: because of primeng that redefines border-radius of all input[type="..."]
265 border-radius: 3px !important;
267 padding: 0 17px 0 13px;
271 @mixin peertube-button-link {
272 @include disable-default-a-behaviour;
273 @include peertube-button;
275 display: inline-block;
278 @mixin peertube-button-outline {
279 @include disable-default-a-behaviour;
280 @include peertube-button;
282 display: inline-block;
286 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
287 display: inline-flex;
289 line-height: normal !important;
294 margin-right: $margin-right;
299 @mixin peertube-file {
302 display: inline-block;
313 filter: alpha(opacity=0);
322 @mixin peertube-button-file ($width) {
323 @include peertube-file;
324 @include peertube-button;
329 @mixin icon ($size) {
330 display: inline-block;
331 background-repeat: no-repeat;
332 background-size: contain;
335 vertical-align: middle;
339 @mixin responsive-width ($width) {
342 @media screen and (max-width: $width) {
347 @mixin peertube-select-container ($width) {
352 color: pvar(--inputForegroundColor);
353 background: pvar(--inputBackgroundColor);
358 background-color: #E5E5E5;
365 @media screen and (max-width: $width) {
371 right: calc(0% + 15px);
376 pointer-events: none;
377 border: 5px solid rgba(0, 0, 0, 0);
378 border-top-color: #000;
384 padding: 0 35px 0 12px;
386 border: 1px solid #C6C6C6;
387 background: transparent none;
390 height: $button-height;
391 text-overflow: ellipsis;
392 color: pvar(--mainForegroundColor);
400 text-shadow: 0 0 0 #000;
408 &.peertube-select-button {
409 @include grey-button;
413 font-weight: $font-semibold;
414 color: pvar(--greyForegroundColor);
420 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
421 @mixin peertube-radio-container {
426 font-weight: $font-regular;
435 border: 1px solid #000;
436 display: inline-block;
439 vertical-align: middle;
446 &:checked + label::before {
447 background-color: #000;
448 box-shadow: inset 0 0 0 4px #fff;
451 &:focus + label::before {
458 @mixin peertube-checkbox ($border-width) {
463 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
471 border: $border-width solid #C6C6C6;
473 vertical-align: middle;
479 top: calc(2px - #{$border-width});
484 transform: rotate(45deg) scale(0);
485 border-right: 2px solid $bg-color;
486 border-bottom: 2px solid $bg-color;
491 border-color: transparent;
492 background: pvar(--mainColor);
493 animation: jelly 0.6s ease;
497 transform: rotate(45deg) scale(1);
503 font-weight: $font-regular;
510 &[disabled] + span + span {
518 padding: 1/4em 1/2em;
519 text-transform: uppercase;
520 font-weight: $font-bold;
522 letter-spacing: 1/3px;
526 background-color: #ffcdd2;
531 text-decoration: line-through;
535 background-color: #feedaf;
540 background-color: #ffd8b2;
545 background-color: #c8e6c9;
550 background-color: #b3e5fc;
555 background-color: #eccfff;
560 @mixin actor-avatar-size ($size) {
561 display: inline-block;
568 @mixin chevron ($size, $border-width) {
570 border-width: $border-width $border-width 0 0;
572 display: inline-block;
573 transform: rotate(-45deg);
578 @mixin chevron-right ($size, $border-width) {
579 @include chevron($size, $border-width);
582 transform: rotate(45deg);
585 @mixin chevron-left ($size, $border-width) {
586 @include chevron($size, $border-width);
589 transform: rotate(-135deg);
592 @mixin in-content-small-title {
593 text-transform: uppercase;
594 color: pvar(--mainColor);
595 font-weight: $font-bold;
599 @mixin settings-big-title {
600 text-transform: uppercase;
601 color: pvar(--mainColor);
602 font-weight: $font-bold;
607 @mixin create-button {
608 @include peertube-button-link;
609 @include orange-button;
610 @include button-with-icon(20px, 5px, -1px);
613 @mixin row-blocks ($column-responsive: true) {
616 padding-bottom: 20px;
618 border-bottom: 1px solid #C6C6C6;
620 @media screen and (max-width: $small-view) {
621 @if $column-responsive {
622 flex-direction: column;
627 padding-bottom: 10px;
633 @mixin dropdown-with-icon-item {
646 @mixin progressbar($small: false) {
647 background-color: $grey-background-color;
652 border-radius: 0.25rem;
657 color: $grey-foreground-color;
671 color: pvar(--mainBackgroundColor);
672 background-color: pvar(--mainColor);
674 flex-direction: column;
675 justify-content: center;
678 transition: width 0.6s ease;
681 background-color: pvar(--secondaryColor);
685 background-color: lighten($color: #c54130, $amount: 10);
693 padding: 0.75rem 1rem;
696 background-color: pvar(--submenuBackgroundColor);
697 border-radius: 0.25rem;
703 color: pvar(--mainColor);
707 padding-left: 0.5rem;
709 display: inline-block;
710 padding-right: 0.5rem;
728 box-sizing: border-box;
729 flex: 0 0 percentage(1/3);
734 @include disable-default-a-behaviour;
736 text-decoration: none;
751 background: pvar(--submenuBackgroundColor);
753 box-sizing: border-box;
762 color: pvar(--mainForegroundColor);
769 color: pvar(--inputPlaceholderColor);
774 @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) {
776 border-top: .05rem solid $color;
786 background: $background;
788 content: attr(data-content);
789 display: inline-block;
792 transform: translateY(-.65rem);
799 --chip-padding: .2rem .4rem;
800 $avatar-height: 1.2rem;
803 border-radius: var(--chip-radius);
804 display: inline-flex;
806 color: pvar(--mainForegroundColor);
807 height: $avatar-height;
812 padding: var(--chip-padding);
813 text-decoration: none;
814 text-overflow: ellipsis;
815 vertical-align: middle;
819 --chip-radius: .2rem;
820 --chip-padding: .2rem .3rem;
829 $avatar-height: 2rem;
831 height: $avatar-height;
834 @include actor-avatar-size($avatar-height);
839 flex-direction: column;
840 height: $avatar-height;
843 justify-content: center;
848 // applies ratio (default to 16:9) to a child element (using $selector) only using
849 // an immediate's parent size. This allows to set a ratio without explicit
850 // dimensions, as width/height cannot be computed from each other.
851 @mixin block-ratio ($selector: 'div', $inverted-ratio: 9/16) {
852 $padding-percent: percentage($inverted-ratio);
857 padding-top: $padding-percent;
871 border-bottom: 2px solid $grey-background-color;
872 padding-bottom: 15px;
873 margin-bottom: $sub-menu-margin-bottom;
875 > span > my-global-icon,
890 @mixin play-icon ($width, $height) {
897 transform: translate(-50%, -50%) scale(0.5);
899 border-top: ($height / 2) solid transparent;
900 border-bottom: ($height / 2) solid transparent;
902 border-left: $width solid rgba(255, 255, 255, 0.95);
905 @mixin on-small-main-col () {
906 :host-context(.main-col:not(.expanded)) {
907 @media screen and (max-width: $small-view + $menu-width) {
912 :host-context(.main-col.expanded) {
913 @media screen and (max-width: $small-view) {
919 @mixin on-mobile-main-col () {
920 :host-context(.main-col:not(.expanded)) {
921 @media screen and (max-width: $mobile-view + $menu-width) {
926 :host-context(.main-col.expanded) {
927 @media screen and (max-width: $mobile-view) {