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;
131 @mixin peertube-textarea ($width, $height) {
132 @include peertube-input-text($width);
134 color: pvar(--textareaForegroundColor);
135 background-color: pvar(--textareaBackgroundColor);
141 @mixin orange-button {
142 @include button-focus(pvar(--mainColorLightest));
144 &, &:active, &:focus {
146 background-color: pvar(--mainColor);
151 background-color: pvar(--mainHoverColor);
154 &[disabled], &.disabled {
157 background-color: #C6C6C6;
161 @include apply-svg-color(#fff)
165 @mixin tertiary-button {
166 @include button-focus($grey-button-outline-color);
168 color: pvar(--greyForegroundColor);
169 background-color: transparent;
171 &[disabled], &.disabled {
176 @include apply-svg-color(transparent)
181 @include button-focus($grey-button-outline-color);
182 background-color: $grey-background-color;
183 color: pvar(--greyForegroundColor);
185 &:hover, &:active, &:focus, &[disabled], &.disabled {
186 color: pvar(--greyForegroundColor);
187 background-color: $grey-background-hover-color;
190 &[disabled], &.disabled {
195 @include apply-svg-color(pvar(--greyForegroundColor))
199 @mixin danger-button {
200 $color: lighten($color: #c54130, $amount: 10);
203 @include button-focus(scale-color($color, $alpha: -95%));
204 background-color: $color;
207 &:hover, &:active, &:focus, &[disabled], &.disabled {
208 background-color: lighten($color: $color, $amount: 10);
211 &[disabled], &.disabled {
216 @include apply-svg-color($text)
220 @mixin peertube-button {
222 font-weight: $font-semibold;
224 height: $button-height;
225 line-height: $button-height;
228 padding: 0 13px 0 13px;
232 @mixin peertube-button-link {
233 display: inline-block;
235 @include disable-default-a-behaviour;
236 @include peertube-button;
239 @mixin peertube-button-outline {
240 display: inline-block;
242 @include disable-default-a-behaviour;
243 @include peertube-button;
248 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
252 margin-right: $margin-right;
257 @mixin peertube-button-file ($width) {
260 display: inline-block;
264 @include peertube-button;
274 filter: alpha(opacity=0);
283 @mixin icon ($size) {
284 display: inline-block;
285 background-repeat: no-repeat;
286 background-size: contain;
289 vertical-align: middle;
293 @mixin select-arrow-down {
295 right: calc(0% + 15px);
300 pointer-events: none;
301 border: 5px solid rgba(0, 0, 0, 0);
302 border-top-color: #000;
308 @mixin ng-select ($width) {
309 ::ng-deep ng-select {
312 @media screen and (max-width: $width) {
318 @mixin peertube-select-container ($width) {
323 color: pvar(--inputForegroundColor);
324 background: pvar(--inputBackgroundColor);
329 background-color: #E5E5E5;
336 @media screen and (max-width: $width) {
341 @include select-arrow-down;
345 padding: 0 35px 0 12px;
347 border: 1px solid #C6C6C6;
348 background: transparent none;
351 height: $button-height;
352 text-overflow: ellipsis;
353 color: pvar(--mainForegroundColor);
361 text-shadow: 0 0 0 #000;
369 &.peertube-select-button {
370 @include grey-button;
374 font-weight: $font-semibold;
375 color: pvar(--greyForegroundColor);
381 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
382 @mixin peertube-radio-container {
383 input[type="radio"] {
387 font-weight: $font-regular;
396 border: 1px solid #000;
397 display: inline-block;
400 vertical-align: middle;
407 &:checked + label:before {
408 background-color: #000;
409 box-shadow: inset 0 0 0 4px #fff;
412 &:focus + label:before {
419 @mixin peertube-checkbox ($border-width) {
424 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
432 border: $border-width solid #C6C6C6;
434 vertical-align: middle;
440 top: calc(2px - #{$border-width});
445 transform: rotate(45deg) scale(0);
446 border-right: 2px solid $bg-color;
447 border-bottom: 2px solid $bg-color;
452 border-color: transparent;
453 background: pvar(--mainColor);
454 animation: jelly 0.6s ease;
458 transform: rotate(45deg) scale(1);
464 font-weight: $font-regular;
471 &[disabled] + span + span{
479 padding: 1/4em 1/2em;
480 text-transform: uppercase;
481 font-weight: $font-bold;
483 letter-spacing: 1/3px;
487 background-color: #ffcdd2;
492 text-decoration: line-through;
496 background-color: #feedaf;
501 background-color: #ffd8b2;
506 background-color: #c8e6c9;
511 background-color: #b3e5fc;
516 background-color: #eccfff;
521 @mixin avatar ($size) {
530 @mixin chevron ($size, $border-width) {
532 border-width: $border-width $border-width 0 0;
534 display: inline-block;
535 transform: rotate(-45deg);
540 @mixin chevron-right ($size, $border-width) {
541 @include chevron($size, $border-width);
544 transform: rotate(45deg);
547 @mixin chevron-left ($size, $border-width) {
548 @include chevron($size, $border-width);
551 transform: rotate(-135deg);
554 @mixin in-content-small-title {
555 text-transform: uppercase;
556 color: pvar(--mainColor);
557 font-weight: $font-bold;
561 @mixin settings-big-title {
562 text-transform: uppercase;
563 color: pvar(--mainColor);
564 font-weight: $font-bold;
570 @include disable-default-a-behaviour;
574 color: pvar(--mainForegroundColor);
581 @include avatar(18px);
589 @mixin sub-menu-with-actor {
594 flex-direction: column;
595 align-items: flex-start;
603 @include avatar(80px);
610 flex-direction: column;
611 justify-content: center;
618 .actor-display-name {
620 font-weight: $font-bold;
628 color: $grey-actor-name;
641 @include actor-owner;
653 text-transform: uppercase;
657 @media screen and (max-width: $mobile-view) {
664 @mixin create-button {
665 @include peertube-button-link;
666 @include orange-button;
667 @include button-with-icon(20px, 5px, -1px);
673 padding-bottom: 20px;
675 border-bottom: 1px solid #C6C6C6;
677 @media screen and (max-width: 800px) {
678 flex-direction: column;
684 @mixin dropdown-with-icon-item {
697 @mixin progressbar($small: false) {
698 background-color: $grey-background-color;
703 border-radius: 0.25rem;
708 color: $grey-foreground-color;
722 color: pvar(--mainBackgroundColor);
723 background-color: pvar(--mainColor);
725 flex-direction: column;
726 justify-content: center;
729 transition: width 0.6s ease;
732 background-color: pvar(--secondaryColor);
740 padding: 0.75rem 1rem;
743 background-color: pvar(--submenuColor);
744 border-radius: 0.25rem;
750 color: pvar(--mainColor);
753 & + .breadcrumb-item {
754 padding-left: 0.5rem;
756 display: inline-block;
757 padding-right: 0.5rem;
775 box-sizing: border-box;
776 flex: 0 0 percentage(1/3);
781 @include disable-default-a-behaviour;
783 text-decoration: none;
798 background: pvar(--submenuColor);
800 box-sizing: border-box;
805 .dashboard-num, .dashboard-text {
809 color: pvar(--mainForegroundColor);
816 color: pvar(--inputPlaceholderColor);
821 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
823 border-top: .05rem solid $color;
833 background: $background;
835 content: attr(data-content);
836 display: inline-block;
839 transform: translateY(-.65rem);
846 --chip-padding: .2rem .4rem;
847 $avatar-height: 1.2rem;
850 border-radius: var(--chip-radius);
851 display: inline-flex;
853 color: pvar(--mainForegroundColor);
854 height: $avatar-height;
859 padding: var(--chip-padding);
860 text-decoration: none;
861 text-overflow: ellipsis;
862 vertical-align: middle;
866 --chip-radius: .2rem;
867 --chip-padding: .2rem .3rem;
873 height: $avatar-height;
874 width: $avatar-height;
877 display: inline-block;
880 vertical-align: middle;
884 $avatar-height: 2rem;
886 height: $avatar-height;
889 height: $avatar-height;
890 width: $avatar-height;
895 flex-direction: column;
896 height: $avatar-height;
899 justify-content: center;
904 @mixin admin-sub-header-responsive ($horizontal-margins) {
905 flex-direction: column;
908 margin-right: 0px !important;
919 width: calc(100vw - #{$horizontal-margins*2});
927 // applies 16:9 ratio to a child element (using $selector) only using
928 // an immediate's parent size. This allows 16:9 ratio without explicit
929 // dimensions, as width/height cannot be computed from each other.
930 @mixin large-screen-ratio ($selector: 'div') {
948 border-bottom: 2px solid $grey-background-color;
949 padding-bottom: 15px;
950 margin-bottom: $sub-menu-margin-bottom;
954 vertical-align: bottom;
965 @mixin play-icon ($width, $height) {
972 transform: translate(-50%, -50%) scale(0.5);
974 border-top: ($height / 2) solid transparent;
975 border-bottom: ($height / 2) solid transparent;
977 border-left: $width solid rgba(255, 255, 255, 0.95);