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 max-height: $font-size * $number-of-lines;
27 /* Fallback for non-webkit */
28 font-size: $font-size;
29 line-height: $font-size;
31 text-overflow: ellipsis;
34 @mixin prefix($property, $parameters...) {
35 @each $prefix in -webkit-, -moz-, -ms-, -o-, "" {
36 #{$prefix}#{$property}: $parameters;
40 @mixin peertube-word-wrap {
41 word-break: break-word;
42 word-wrap: break-word;
43 overflow-wrap: break-word;
44 -webkit-hyphens: auto;
50 @mixin apply-svg-color ($color) {
61 polygon[fill="#000"] {
68 circle[stroke="#000"],
69 polygon[stroke="#000"] {
73 stop[stop-color="#000"] {
79 @mixin fill-svg-color ($color) {
87 @mixin button-focus($color) {
90 box-shadow: #{$focus-box-shadow-form} $color;
94 @mixin peertube-input-text($width) {
95 display: inline-block;
96 height: $button-height;
98 color: pvar(--inputForegroundColor);
99 background-color: pvar(--inputBackgroundColor);
100 border: 1px solid #C6C6C6;
107 color: pvar(--inputPlaceholderColor);
114 @media screen and (max-width: $width) {
119 @mixin peertube-input-group($width) {
121 min-height: $button-height;
132 @mixin peertube-textarea ($width, $height) {
133 @include peertube-input-text($width);
135 color: pvar(--textareaForegroundColor);
136 background-color: pvar(--textareaBackgroundColor);
142 @mixin orange-button {
143 @include button-focus(pvar(--mainColorLightest));
145 &, &:active, &:focus {
147 background-color: pvar(--mainColor);
152 background-color: pvar(--mainHoverColor);
155 &[disabled], &.disabled {
158 background-color: #C6C6C6;
162 @include apply-svg-color(#fff)
166 @mixin tertiary-button {
167 @include button-focus($grey-button-outline-color);
169 color: pvar(--greyForegroundColor);
170 background-color: transparent;
172 &[disabled], &.disabled {
177 @include apply-svg-color(transparent)
182 @include button-focus($grey-button-outline-color);
183 background-color: $grey-background-color;
184 color: pvar(--greyForegroundColor);
186 &:hover, &:active, &:focus, &[disabled], &.disabled {
187 color: pvar(--greyForegroundColor);
188 background-color: $grey-background-hover-color;
191 &[disabled], &.disabled {
196 @include apply-svg-color(pvar(--greyForegroundColor))
200 @mixin danger-button {
201 $color: lighten($color: #c54130, $amount: 10);
204 @include button-focus(scale-color($color, $alpha: -95%));
205 background-color: $color;
208 &:hover, &:active, &:focus, &[disabled], &.disabled {
209 background-color: lighten($color: $color, $amount: 10);
212 &[disabled], &.disabled {
217 @include apply-svg-color($text)
221 @mixin peertube-button {
223 font-weight: $font-semibold;
225 height: $button-height;
226 line-height: $button-height;
229 padding: 0 17px 0 13px;
233 @mixin peertube-button-link {
234 display: inline-block;
236 @include disable-default-a-behaviour;
237 @include peertube-button;
240 @mixin peertube-button-outline {
241 display: inline-block;
243 @include disable-default-a-behaviour;
244 @include peertube-button;
249 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
253 margin-right: $margin-right;
258 @mixin peertube-button-file ($width) {
261 display: inline-block;
265 @include peertube-button;
275 filter: alpha(opacity=0);
284 @mixin icon ($size) {
285 display: inline-block;
286 background-repeat: no-repeat;
287 background-size: contain;
290 vertical-align: middle;
294 @mixin select-arrow-down {
296 right: calc(0% + 15px);
301 pointer-events: none;
302 border: 5px solid rgba(0, 0, 0, 0);
303 border-top-color: #000;
309 @mixin ng-select ($width) {
310 ::ng-deep ng-select {
313 @media screen and (max-width: $width) {
319 @mixin peertube-select-container ($width) {
324 color: pvar(--inputForegroundColor);
325 background: pvar(--inputBackgroundColor);
330 background-color: #E5E5E5;
337 @media screen and (max-width: $width) {
342 @include select-arrow-down;
346 padding: 0 35px 0 12px;
348 border: 1px solid #C6C6C6;
349 background: transparent none;
352 height: $button-height;
353 text-overflow: ellipsis;
354 color: pvar(--mainForegroundColor);
362 text-shadow: 0 0 0 #000;
370 &.peertube-select-button {
371 @include grey-button;
375 font-weight: $font-semibold;
376 color: pvar(--greyForegroundColor);
382 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
383 @mixin peertube-radio-container {
384 input[type="radio"] {
388 font-weight: $font-regular;
397 border: 1px solid #000;
398 display: inline-block;
401 vertical-align: middle;
408 &:checked + label:before {
409 background-color: #000;
410 box-shadow: inset 0 0 0 4px #fff;
413 &:focus + label:before {
420 @mixin peertube-checkbox ($border-width) {
425 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
433 border: $border-width solid #C6C6C6;
435 vertical-align: middle;
441 top: calc(2px - #{$border-width});
446 transform: rotate(45deg) scale(0);
447 border-right: 2px solid $bg-color;
448 border-bottom: 2px solid $bg-color;
453 border-color: transparent;
454 background: pvar(--mainColor);
455 animation: jelly 0.6s ease;
459 transform: rotate(45deg) scale(1);
465 font-weight: $font-regular;
472 &[disabled] + span + span{
480 padding: 1/4em 1/2em;
481 text-transform: uppercase;
482 font-weight: $font-bold;
484 letter-spacing: 1/3px;
488 background-color: #ffcdd2;
493 text-decoration: line-through;
497 background-color: #feedaf;
502 background-color: #ffd8b2;
507 background-color: #c8e6c9;
512 background-color: #b3e5fc;
517 background-color: #eccfff;
522 @mixin avatar ($size) {
531 @mixin chevron ($size, $border-width) {
533 border-width: $border-width $border-width 0 0;
535 display: inline-block;
536 transform: rotate(-45deg);
541 @mixin chevron-right ($size, $border-width) {
542 @include chevron($size, $border-width);
545 transform: rotate(45deg);
548 @mixin chevron-left ($size, $border-width) {
549 @include chevron($size, $border-width);
552 transform: rotate(-135deg);
555 @mixin in-content-small-title {
556 text-transform: uppercase;
557 color: pvar(--mainColor);
558 font-weight: $font-bold;
562 @mixin settings-big-title {
563 text-transform: uppercase;
564 color: pvar(--mainColor);
565 font-weight: $font-bold;
571 @include disable-default-a-behaviour;
575 color: pvar(--mainForegroundColor);
582 @include avatar(18px);
590 @mixin sub-menu-with-actor {
595 flex-direction: column;
596 align-items: flex-start;
604 @include avatar(80px);
611 flex-direction: column;
612 justify-content: center;
619 .actor-display-name {
621 font-weight: $font-bold;
629 color: $grey-actor-name;
642 @include actor-owner;
654 text-transform: uppercase;
658 @media screen and (max-width: $mobile-view) {
665 @mixin create-button {
666 @include peertube-button-link;
667 @include orange-button;
668 @include button-with-icon(20px, 5px, -1px);
674 padding-bottom: 20px;
676 border-bottom: 1px solid #C6C6C6;
678 @media screen and (max-width: 800px) {
679 flex-direction: column;
685 @mixin dropdown-with-icon-item {
698 @mixin progressbar($small: false) {
699 background-color: $grey-background-color;
704 border-radius: 0.25rem;
709 color: $grey-foreground-color;
723 color: pvar(--mainBackgroundColor);
724 background-color: pvar(--mainColor);
726 flex-direction: column;
727 justify-content: center;
730 transition: width 0.6s ease;
733 background-color: pvar(--secondaryColor);
737 background-color: lighten($color: #c54130, $amount: 10);
745 padding: 0.75rem 1rem;
748 background-color: pvar(--submenuColor);
749 border-radius: 0.25rem;
755 color: pvar(--mainColor);
758 & + .breadcrumb-item {
759 padding-left: 0.5rem;
761 display: inline-block;
762 padding-right: 0.5rem;
780 box-sizing: border-box;
781 flex: 0 0 percentage(1/3);
786 @include disable-default-a-behaviour;
788 text-decoration: none;
803 background: pvar(--submenuColor);
805 box-sizing: border-box;
810 .dashboard-num, .dashboard-text {
814 color: pvar(--mainForegroundColor);
821 color: pvar(--inputPlaceholderColor);
826 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
828 border-top: .05rem solid $color;
838 background: $background;
840 content: attr(data-content);
841 display: inline-block;
844 transform: translateY(-.65rem);
851 --chip-padding: .2rem .4rem;
852 $avatar-height: 1.2rem;
855 border-radius: var(--chip-radius);
856 display: inline-flex;
858 color: pvar(--mainForegroundColor);
859 height: $avatar-height;
864 padding: var(--chip-padding);
865 text-decoration: none;
866 text-overflow: ellipsis;
867 vertical-align: middle;
871 --chip-radius: .2rem;
872 --chip-padding: .2rem .3rem;
878 height: $avatar-height;
879 width: $avatar-height;
882 display: inline-block;
885 vertical-align: middle;
889 $avatar-height: 2rem;
891 height: $avatar-height;
894 height: $avatar-height;
895 width: $avatar-height;
900 flex-direction: column;
901 height: $avatar-height;
904 justify-content: center;
909 @mixin admin-sub-header-responsive ($horizontal-margins) {
910 flex-direction: column;
913 margin-right: 0px !important;
924 width: calc(100vw - #{$horizontal-margins*2});
932 // applies 16:9 ratio to a child element (using $selector) only using
933 // an immediate's parent size. This allows 16:9 ratio without explicit
934 // dimensions, as width/height cannot be computed from each other.
935 @mixin large-screen-ratio ($selector: 'div') {
953 border-bottom: 2px solid $grey-background-color;
954 padding-bottom: 15px;
955 margin-bottom: $sub-menu-margin-bottom;
959 vertical-align: bottom;
970 @mixin play-icon ($width, $height) {
977 transform: translate(-50%, -50%) scale(0.5);
979 border-top: ($height / 2) solid transparent;
980 border-bottom: ($height / 2) solid transparent;
982 border-left: $width solid rgba(255, 255, 255, 0.95);