3 @mixin disable-default-a-behaviour {
4 &:hover, &:focus, &:active {
5 text-decoration: none !important;
6 outline: none !important;
10 @mixin disable-outline {
11 &:focus:not(.focus-visible) {
19 text-overflow: ellipsis;
22 @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) {
24 /* Fallback for non-webkit */
26 -webkit-line-clamp: $number-of-lines;
27 /* Fallback for non-webkit */
28 font-size: $font-size;
29 line-height: $font-size;
31 text-overflow: ellipsis;
32 max-height: $font-size * $number-of-lines;
35 @mixin fade-text ($fade-after, $background-color) {
47 background: linear-gradient(transparent $fade-after, $background-color);
51 @mixin peertube-word-wrap {
52 word-break: break-word;
53 word-wrap: break-word;
54 overflow-wrap: break-word;
58 @mixin apply-svg-color ($color) {
65 @mixin fill-svg-color ($color) {
73 @mixin button-focus($color) {
76 box-shadow: #{$focus-box-shadow-form} $color;
80 @mixin peertube-input-text($width) {
81 display: inline-block;
82 height: $button-height;
84 color: pvar(--inputForegroundColor);
85 background-color: pvar(--inputBackgroundColor);
86 border: 1px solid #C6C6C6;
93 color: pvar(--inputPlaceholderColor);
100 @media screen and (max-width: $width) {
105 @mixin peertube-input-group($width) {
107 min-height: $button-height;
118 @mixin peertube-textarea ($width, $height) {
119 @include peertube-input-text($width);
121 color: pvar(--textareaForegroundColor);
122 background-color: pvar(--textareaBackgroundColor);
128 @mixin orange-button {
129 @include button-focus(pvar(--mainColorLightest));
131 &, &:active, &:focus {
133 background-color: pvar(--mainColor);
138 background-color: pvar(--mainHoverColor);
141 &[disabled], &.disabled {
144 background-color: #C6C6C6;
148 @include apply-svg-color(#fff)
152 @mixin orange-button-inverted {
153 @include button-focus(pvar(--mainColorLightest));
155 border: 2px solid pvar(--mainColor);
156 font-weight: $font-semibold;
158 &, &:active, &:focus {
159 color: pvar(--mainColor);
160 background-color: pvar(--mainBackgroundColor);
164 color: pvar(--mainColor);
165 background-color: pvar(--mainColorLightest);
168 &[disabled], &.disabled {
170 color: pvar(--mainColor);
171 background-color: #C6C6C6;
175 @include apply-svg-color(pvar(--mainColor))
179 @mixin tertiary-button {
180 @include button-focus($grey-button-outline-color);
182 color: pvar(--greyForegroundColor);
183 background-color: transparent;
185 &[disabled], &.disabled {
190 @include apply-svg-color(transparent)
195 @include button-focus($grey-button-outline-color);
197 background-color: $grey-background-color;
198 color: pvar(--greyForegroundColor);
200 &:hover, &:active, &:focus, &[disabled], &.disabled {
201 color: pvar(--greyForegroundColor);
202 background-color: $grey-background-hover-color;
205 &[disabled], &.disabled {
210 @include apply-svg-color(pvar(--greyForegroundColor))
214 @mixin danger-button {
215 $color: lighten($color: #c54130, $amount: 10);
218 @include button-focus(scale-color($color, $alpha: -95%));
219 background-color: $color;
222 &:hover, &:active, &:focus, &[disabled], &.disabled {
223 background-color: lighten($color: $color, $amount: 10);
226 &[disabled], &.disabled {
231 @include apply-svg-color($text)
235 @mixin peertube-button {
237 font-weight: $font-semibold;
239 height: $button-height;
240 line-height: $button-height;
241 // FIXME: because of primeng that redefines border-radius of all input[type="..."]
242 border-radius: 3px !important;
244 padding: 0 17px 0 13px;
248 @mixin peertube-button-link {
249 display: inline-block;
251 @include disable-default-a-behaviour;
252 @include peertube-button;
255 @mixin peertube-button-outline {
256 display: inline-block;
258 @include disable-default-a-behaviour;
259 @include peertube-button;
264 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
265 display: inline-flex;
267 line-height: normal !important;
272 margin-right: $margin-right;
277 @mixin peertube-file {
280 display: inline-block;
291 filter: alpha(opacity=0);
300 @mixin peertube-button-file ($width) {
303 @include peertube-file;
304 @include peertube-button;
307 @mixin icon ($size) {
308 display: inline-block;
309 background-repeat: no-repeat;
310 background-size: contain;
313 vertical-align: middle;
317 @mixin select-arrow-down {
319 right: calc(0% + 15px);
324 pointer-events: none;
325 border: 5px solid rgba(0, 0, 0, 0);
326 border-top-color: #000;
331 @mixin responsive-width ($width) {
334 @media screen and (max-width: $width) {
339 @mixin peertube-select-container ($width) {
344 color: pvar(--inputForegroundColor);
345 background: pvar(--inputBackgroundColor);
350 background-color: #E5E5E5;
357 @media screen and (max-width: $width) {
362 @include select-arrow-down;
366 padding: 0 35px 0 12px;
368 border: 1px solid #C6C6C6;
369 background: transparent none;
372 height: $button-height;
373 text-overflow: ellipsis;
374 color: pvar(--mainForegroundColor);
382 text-shadow: 0 0 0 #000;
390 &.peertube-select-button {
391 @include grey-button;
395 font-weight: $font-semibold;
396 color: pvar(--greyForegroundColor);
402 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
403 @mixin peertube-radio-container {
404 input[type="radio"] {
408 font-weight: $font-regular;
417 border: 1px solid #000;
418 display: inline-block;
421 vertical-align: middle;
428 &:checked + label:before {
429 background-color: #000;
430 box-shadow: inset 0 0 0 4px #fff;
433 &:focus + label:before {
440 @mixin peertube-checkbox ($border-width) {
445 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
453 border: $border-width solid #C6C6C6;
455 vertical-align: middle;
461 top: calc(2px - #{$border-width});
466 transform: rotate(45deg) scale(0);
467 border-right: 2px solid $bg-color;
468 border-bottom: 2px solid $bg-color;
473 border-color: transparent;
474 background: pvar(--mainColor);
475 animation: jelly 0.6s ease;
479 transform: rotate(45deg) scale(1);
485 font-weight: $font-regular;
492 &[disabled] + span + span{
500 padding: 1/4em 1/2em;
501 text-transform: uppercase;
502 font-weight: $font-bold;
504 letter-spacing: 1/3px;
508 background-color: #ffcdd2;
513 text-decoration: line-through;
517 background-color: #feedaf;
522 background-color: #ffd8b2;
527 background-color: #c8e6c9;
532 background-color: #b3e5fc;
537 background-color: #eccfff;
542 @mixin avatar ($size) {
551 @mixin channel-avatar ($size) {
559 @mixin chevron ($size, $border-width) {
561 border-width: $border-width $border-width 0 0;
563 display: inline-block;
564 transform: rotate(-45deg);
569 @mixin chevron-right ($size, $border-width) {
570 @include chevron($size, $border-width);
573 transform: rotate(45deg);
576 @mixin chevron-left ($size, $border-width) {
577 @include chevron($size, $border-width);
580 transform: rotate(-135deg);
583 @mixin in-content-small-title {
584 text-transform: uppercase;
585 color: pvar(--mainColor);
586 font-weight: $font-bold;
590 @mixin settings-big-title {
591 text-transform: uppercase;
592 color: pvar(--mainColor);
593 font-weight: $font-bold;
599 @include disable-default-a-behaviour;
603 color: pvar(--mainForegroundColor);
610 @include avatar(18px);
618 @mixin create-button {
619 @include peertube-button-link;
620 @include orange-button;
621 @include button-with-icon(20px, 5px, -1px);
624 @mixin row-blocks ($column-responsive: true) {
627 padding-bottom: 20px;
629 border-bottom: 1px solid #C6C6C6;
631 @media screen and (max-width: $small-view) {
632 @if $column-responsive {
633 flex-direction: column;
638 padding-bottom: 10px;
644 @mixin dropdown-with-icon-item {
657 @mixin progressbar($small: false) {
658 background-color: $grey-background-color;
663 border-radius: 0.25rem;
668 color: $grey-foreground-color;
682 color: pvar(--mainBackgroundColor);
683 background-color: pvar(--mainColor);
685 flex-direction: column;
686 justify-content: center;
689 transition: width 0.6s ease;
692 background-color: pvar(--secondaryColor);
696 background-color: lighten($color: #c54130, $amount: 10);
704 padding: 0.75rem 1rem;
707 background-color: pvar(--submenuBackgroundColor);
708 border-radius: 0.25rem;
714 color: pvar(--mainColor);
717 & + .breadcrumb-item {
718 padding-left: 0.5rem;
720 display: inline-block;
721 padding-right: 0.5rem;
739 box-sizing: border-box;
740 flex: 0 0 percentage(1/3);
745 @include disable-default-a-behaviour;
747 text-decoration: none;
762 background: pvar(--submenuBackgroundColor);
764 box-sizing: border-box;
769 .dashboard-num, .dashboard-text {
772 color: pvar(--mainForegroundColor);
779 color: pvar(--inputPlaceholderColor);
784 @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) {
786 border-top: .05rem solid $color;
796 background: $background;
798 content: attr(data-content);
799 display: inline-block;
802 transform: translateY(-.65rem);
809 --chip-padding: .2rem .4rem;
810 $avatar-height: 1.2rem;
813 border-radius: var(--chip-radius);
814 display: inline-flex;
816 color: pvar(--mainForegroundColor);
817 height: $avatar-height;
822 padding: var(--chip-padding);
823 text-decoration: none;
824 text-overflow: ellipsis;
825 vertical-align: middle;
829 --chip-radius: .2rem;
830 --chip-padding: .2rem .3rem;
836 height: $avatar-height;
837 width: $avatar-height;
840 display: inline-block;
843 vertical-align: middle;
847 $avatar-height: 2rem;
849 height: $avatar-height;
852 height: $avatar-height;
853 width: $avatar-height;
858 flex-direction: column;
859 height: $avatar-height;
862 justify-content: center;
867 @mixin admin-sub-header-responsive {
868 flex-direction: column;
871 margin-right: 0px !important;
890 // applies ratio (default to 16:9) to a child element (using $selector) only using
891 // an immediate's parent size. This allows to set a ratio without explicit
892 // dimensions, as width/height cannot be computed from each other.
893 @mixin block-ratio ($selector: 'div', $inverted-ratio: 9/16) {
894 $padding-percent: percentage($inverted-ratio);
899 padding-top: $padding-percent;
913 border-bottom: 2px solid $grey-background-color;
914 padding-bottom: 15px;
915 margin-bottom: $sub-menu-margin-bottom;
919 vertical-align: bottom;
930 @mixin play-icon ($width, $height) {
937 transform: translate(-50%, -50%) scale(0.5);
939 border-top: ($height / 2) solid transparent;
940 border-bottom: ($height / 2) solid transparent;
942 border-left: $width solid rgba(255, 255, 255, 0.95);
945 @mixin on-small-main-col () {
946 :host-context(.main-col:not(.expanded)) {
947 @media screen and (max-width: $small-view + $menu-width) {
952 :host-context(.main-col.expanded) {
953 @media screen and (max-width: $small-view) {
959 @mixin on-mobile-main-col () {
960 :host-context(.main-col:not(.expanded)) {
961 @media screen and (max-width: $mobile-view + $menu-width) {
966 :host-context(.main-col.expanded) {
967 @media screen and (max-width: $mobile-view) {