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 fade-text ($fade-after, $background-color) {
46 background: linear-gradient(transparent $fade-after, $background-color);
50 @mixin peertube-word-wrap {
51 word-break: break-word;
52 word-wrap: break-word;
53 overflow-wrap: break-word;
57 @mixin apply-svg-color ($color) {
64 @mixin fill-svg-color ($color) {
72 @mixin button-focus($color) {
75 box-shadow: #{$focus-box-shadow-form} $color;
79 @mixin peertube-input-text($width) {
80 display: inline-block;
81 height: $button-height;
83 color: pvar(--inputForegroundColor);
84 background-color: pvar(--inputBackgroundColor);
85 border: 1px solid #C6C6C6;
92 color: pvar(--inputPlaceholderColor);
99 @media screen and (max-width: $width) {
104 @mixin peertube-input-group($width) {
106 min-height: $button-height;
117 @mixin peertube-textarea ($width, $height) {
118 @include peertube-input-text($width);
120 color: pvar(--textareaForegroundColor);
121 background-color: pvar(--textareaBackgroundColor);
127 @mixin orange-button {
128 @include button-focus(pvar(--mainColorLightest));
130 &, &:active, &:focus {
132 background-color: pvar(--mainColor);
137 background-color: pvar(--mainHoverColor);
140 &[disabled], &.disabled {
143 background-color: #C6C6C6;
147 @include apply-svg-color(#fff)
151 @mixin orange-button-inverted {
152 @include button-focus(pvar(--mainColorLightest));
154 border: 2px solid pvar(--mainColor);
155 font-weight: $font-regular;
157 &, &:active, &:focus {
158 color: pvar(--mainColor);
159 background-color: pvar(--mainBackgroundColor);
163 color: pvar(--mainColor);
164 background-color: pvar(--mainColorLightest);
167 &[disabled], &.disabled {
169 color: pvar(--mainColor);
170 background-color: #C6C6C6;
174 @include apply-svg-color(pvar(--mainColor))
178 @mixin tertiary-button {
179 @include button-focus($grey-button-outline-color);
181 color: pvar(--greyForegroundColor);
182 background-color: transparent;
184 &[disabled], &.disabled {
189 @include apply-svg-color(transparent)
194 @include button-focus($grey-button-outline-color);
196 background-color: $grey-background-color;
197 color: pvar(--greyForegroundColor);
199 &:hover, &:active, &:focus, &[disabled], &.disabled {
200 color: pvar(--greyForegroundColor);
201 background-color: $grey-background-hover-color;
204 &[disabled], &.disabled {
209 @include apply-svg-color(pvar(--greyForegroundColor))
213 @mixin danger-button {
214 $color: lighten($color: #c54130, $amount: 10);
217 @include button-focus(scale-color($color, $alpha: -95%));
218 background-color: $color;
221 &:hover, &:active, &:focus, &[disabled], &.disabled {
222 background-color: lighten($color: $color, $amount: 10);
225 &[disabled], &.disabled {
230 @include apply-svg-color($text)
234 @mixin peertube-button {
236 font-weight: $font-semibold;
238 height: $button-height;
239 line-height: $button-height;
242 padding: 0 17px 0 13px;
246 @mixin peertube-button-link {
247 display: inline-block;
249 @include disable-default-a-behaviour;
250 @include peertube-button;
253 @mixin peertube-button-outline {
254 display: inline-block;
256 @include disable-default-a-behaviour;
257 @include peertube-button;
262 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
263 display: inline-flex;
265 line-height: normal !important;
270 margin-right: $margin-right;
275 @mixin peertube-file {
278 display: inline-block;
289 filter: alpha(opacity=0);
298 @mixin peertube-button-file ($width) {
301 @include peertube-file;
302 @include peertube-button;
305 @mixin icon ($size) {
306 display: inline-block;
307 background-repeat: no-repeat;
308 background-size: contain;
311 vertical-align: middle;
315 @mixin select-arrow-down {
317 right: calc(0% + 15px);
322 pointer-events: none;
323 border: 5px solid rgba(0, 0, 0, 0);
324 border-top-color: #000;
329 @mixin responsive-width ($width) {
332 @media screen and (max-width: $width) {
337 @mixin peertube-select-container ($width) {
342 color: pvar(--inputForegroundColor);
343 background: pvar(--inputBackgroundColor);
348 background-color: #E5E5E5;
355 @media screen and (max-width: $width) {
360 @include select-arrow-down;
364 padding: 0 35px 0 12px;
366 border: 1px solid #C6C6C6;
367 background: transparent none;
370 height: $button-height;
371 text-overflow: ellipsis;
372 color: pvar(--mainForegroundColor);
380 text-shadow: 0 0 0 #000;
388 &.peertube-select-button {
389 @include grey-button;
393 font-weight: $font-semibold;
394 color: pvar(--greyForegroundColor);
400 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
401 @mixin peertube-radio-container {
402 input[type="radio"] {
406 font-weight: $font-regular;
415 border: 1px solid #000;
416 display: inline-block;
419 vertical-align: middle;
426 &:checked + label:before {
427 background-color: #000;
428 box-shadow: inset 0 0 0 4px #fff;
431 &:focus + label:before {
438 @mixin peertube-checkbox ($border-width) {
443 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
451 border: $border-width solid #C6C6C6;
453 vertical-align: middle;
459 top: calc(2px - #{$border-width});
464 transform: rotate(45deg) scale(0);
465 border-right: 2px solid $bg-color;
466 border-bottom: 2px solid $bg-color;
471 border-color: transparent;
472 background: pvar(--mainColor);
473 animation: jelly 0.6s ease;
477 transform: rotate(45deg) scale(1);
483 font-weight: $font-regular;
490 &[disabled] + span + span{
498 padding: 1/4em 1/2em;
499 text-transform: uppercase;
500 font-weight: $font-bold;
502 letter-spacing: 1/3px;
506 background-color: #ffcdd2;
511 text-decoration: line-through;
515 background-color: #feedaf;
520 background-color: #ffd8b2;
525 background-color: #c8e6c9;
530 background-color: #b3e5fc;
535 background-color: #eccfff;
540 @mixin avatar ($size) {
549 @mixin channel-avatar ($size) {
556 @mixin chevron ($size, $border-width) {
558 border-width: $border-width $border-width 0 0;
560 display: inline-block;
561 transform: rotate(-45deg);
566 @mixin chevron-right ($size, $border-width) {
567 @include chevron($size, $border-width);
570 transform: rotate(45deg);
573 @mixin chevron-left ($size, $border-width) {
574 @include chevron($size, $border-width);
577 transform: rotate(-135deg);
580 @mixin in-content-small-title {
581 text-transform: uppercase;
582 color: pvar(--mainColor);
583 font-weight: $font-bold;
587 @mixin settings-big-title {
588 text-transform: uppercase;
589 color: pvar(--mainColor);
590 font-weight: $font-bold;
596 @include disable-default-a-behaviour;
600 color: pvar(--mainForegroundColor);
607 @include avatar(18px);
615 @mixin create-button {
616 @include peertube-button-link;
617 @include orange-button;
618 @include button-with-icon(20px, 5px, -1px);
624 padding-bottom: 20px;
626 border-bottom: 1px solid #C6C6C6;
628 @media screen and (max-width: 800px) {
629 flex-direction: column;
635 @mixin dropdown-with-icon-item {
648 @mixin progressbar($small: false) {
649 background-color: $grey-background-color;
654 border-radius: 0.25rem;
659 color: $grey-foreground-color;
673 color: pvar(--mainBackgroundColor);
674 background-color: pvar(--mainColor);
676 flex-direction: column;
677 justify-content: center;
680 transition: width 0.6s ease;
683 background-color: pvar(--secondaryColor);
687 background-color: lighten($color: #c54130, $amount: 10);
695 padding: 0.75rem 1rem;
698 background-color: pvar(--submenuColor);
699 border-radius: 0.25rem;
705 color: pvar(--mainColor);
708 & + .breadcrumb-item {
709 padding-left: 0.5rem;
711 display: inline-block;
712 padding-right: 0.5rem;
730 box-sizing: border-box;
731 flex: 0 0 percentage(1/3);
736 @include disable-default-a-behaviour;
738 text-decoration: none;
753 background: pvar(--submenuColor);
755 box-sizing: border-box;
760 .dashboard-num, .dashboard-text {
763 color: pvar(--mainForegroundColor);
770 color: pvar(--inputPlaceholderColor);
775 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
777 border-top: .05rem solid $color;
787 background: $background;
789 content: attr(data-content);
790 display: inline-block;
793 transform: translateY(-.65rem);
800 --chip-padding: .2rem .4rem;
801 $avatar-height: 1.2rem;
804 border-radius: var(--chip-radius);
805 display: inline-flex;
807 color: pvar(--mainForegroundColor);
808 height: $avatar-height;
813 padding: var(--chip-padding);
814 text-decoration: none;
815 text-overflow: ellipsis;
816 vertical-align: middle;
820 --chip-radius: .2rem;
821 --chip-padding: .2rem .3rem;
827 height: $avatar-height;
828 width: $avatar-height;
831 display: inline-block;
834 vertical-align: middle;
838 $avatar-height: 2rem;
840 height: $avatar-height;
843 height: $avatar-height;
844 width: $avatar-height;
849 flex-direction: column;
850 height: $avatar-height;
853 justify-content: center;
858 @mixin admin-sub-header-responsive ($horizontal-margins) {
859 flex-direction: column;
862 margin-right: 0px !important;
873 width: calc(100vw - #{$horizontal-margins*2});
881 // applies 16:9 ratio to a child element (using $selector) only using
882 // an immediate's parent size. This allows 16:9 ratio without explicit
883 // dimensions, as width/height cannot be computed from each other.
884 @mixin large-screen-ratio ($selector: 'div') {
902 border-bottom: 2px solid $grey-background-color;
903 padding-bottom: 15px;
904 margin-bottom: $sub-menu-margin-bottom;
908 vertical-align: bottom;
919 @mixin play-icon ($width, $height) {
926 transform: translate(-50%, -50%) scale(0.5);
928 border-top: ($height / 2) solid transparent;
929 border-bottom: ($height / 2) solid transparent;
931 border-left: $width solid rgba(255, 255, 255, 0.95);