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 actor-avatar-size ($size) {
543 display: inline-block;
550 @mixin chevron ($size, $border-width) {
552 border-width: $border-width $border-width 0 0;
554 display: inline-block;
555 transform: rotate(-45deg);
560 @mixin chevron-right ($size, $border-width) {
561 @include chevron($size, $border-width);
564 transform: rotate(45deg);
567 @mixin chevron-left ($size, $border-width) {
568 @include chevron($size, $border-width);
571 transform: rotate(-135deg);
574 @mixin in-content-small-title {
575 text-transform: uppercase;
576 color: pvar(--mainColor);
577 font-weight: $font-bold;
581 @mixin settings-big-title {
582 text-transform: uppercase;
583 color: pvar(--mainColor);
584 font-weight: $font-bold;
589 @mixin create-button {
590 @include peertube-button-link;
591 @include orange-button;
592 @include button-with-icon(20px, 5px, -1px);
595 @mixin row-blocks ($column-responsive: true) {
598 padding-bottom: 20px;
600 border-bottom: 1px solid #C6C6C6;
602 @media screen and (max-width: $small-view) {
603 @if $column-responsive {
604 flex-direction: column;
609 padding-bottom: 10px;
615 @mixin dropdown-with-icon-item {
628 @mixin progressbar($small: false) {
629 background-color: $grey-background-color;
634 border-radius: 0.25rem;
639 color: $grey-foreground-color;
653 color: pvar(--mainBackgroundColor);
654 background-color: pvar(--mainColor);
656 flex-direction: column;
657 justify-content: center;
660 transition: width 0.6s ease;
663 background-color: pvar(--secondaryColor);
667 background-color: lighten($color: #c54130, $amount: 10);
675 padding: 0.75rem 1rem;
678 background-color: pvar(--submenuBackgroundColor);
679 border-radius: 0.25rem;
685 color: pvar(--mainColor);
688 & + .breadcrumb-item {
689 padding-left: 0.5rem;
691 display: inline-block;
692 padding-right: 0.5rem;
710 box-sizing: border-box;
711 flex: 0 0 percentage(1/3);
716 @include disable-default-a-behaviour;
718 text-decoration: none;
733 background: pvar(--submenuBackgroundColor);
735 box-sizing: border-box;
740 .dashboard-num, .dashboard-text {
743 color: pvar(--mainForegroundColor);
750 color: pvar(--inputPlaceholderColor);
755 @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) {
757 border-top: .05rem solid $color;
767 background: $background;
769 content: attr(data-content);
770 display: inline-block;
773 transform: translateY(-.65rem);
780 --chip-padding: .2rem .4rem;
781 $avatar-height: 1.2rem;
784 border-radius: var(--chip-radius);
785 display: inline-flex;
787 color: pvar(--mainForegroundColor);
788 height: $avatar-height;
793 padding: var(--chip-padding);
794 text-decoration: none;
795 text-overflow: ellipsis;
796 vertical-align: middle;
800 --chip-radius: .2rem;
801 --chip-padding: .2rem .3rem;
810 $avatar-height: 2rem;
812 height: $avatar-height;
815 height: $avatar-height;
816 width: $avatar-height;
821 flex-direction: column;
822 height: $avatar-height;
825 justify-content: center;
830 @mixin admin-sub-header-responsive {
831 flex-direction: column;
834 margin-right: 0px !important;
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
855 // dimensions, as width/height cannot be computed from each other.
856 @mixin block-ratio ($selector: 'div', $inverted-ratio: 9/16) {
857 $padding-percent: percentage($inverted-ratio);
862 padding-top: $padding-percent;
876 border-bottom: 2px solid $grey-background-color;
877 padding-bottom: 15px;
878 margin-bottom: $sub-menu-margin-bottom;
882 vertical-align: bottom;
893 @mixin play-icon ($width, $height) {
900 transform: translate(-50%, -50%) scale(0.5);
902 border-top: ($height / 2) solid transparent;
903 border-bottom: ($height / 2) solid transparent;
905 border-left: $width solid rgba(255, 255, 255, 0.95);
908 @mixin on-small-main-col () {
909 :host-context(.main-col:not(.expanded)) {
910 @media screen and (max-width: $small-view + $menu-width) {
915 :host-context(.main-col.expanded) {
916 @media screen and (max-width: $small-view) {
922 @mixin on-mobile-main-col () {
923 :host-context(.main-col:not(.expanded)) {
924 @media screen and (max-width: $mobile-view + $menu-width) {
929 :host-context(.main-col.expanded) {
930 @media screen and (max-width: $mobile-view) {