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;
243 padding: 0 17px 0 13px;
247 @mixin peertube-button-link {
248 display: inline-block;
250 @include disable-default-a-behaviour;
251 @include peertube-button;
254 @mixin peertube-button-outline {
255 display: inline-block;
257 @include disable-default-a-behaviour;
258 @include peertube-button;
263 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
264 display: inline-flex;
266 line-height: normal !important;
271 margin-right: $margin-right;
276 @mixin peertube-file {
279 display: inline-block;
290 filter: alpha(opacity=0);
299 @mixin peertube-button-file ($width) {
302 @include peertube-file;
303 @include peertube-button;
306 @mixin icon ($size) {
307 display: inline-block;
308 background-repeat: no-repeat;
309 background-size: contain;
312 vertical-align: middle;
316 @mixin select-arrow-down {
318 right: calc(0% + 15px);
323 pointer-events: none;
324 border: 5px solid rgba(0, 0, 0, 0);
325 border-top-color: #000;
330 @mixin responsive-width ($width) {
333 @media screen and (max-width: $width) {
338 @mixin peertube-select-container ($width) {
343 color: pvar(--inputForegroundColor);
344 background: pvar(--inputBackgroundColor);
349 background-color: #E5E5E5;
356 @media screen and (max-width: $width) {
361 @include select-arrow-down;
365 padding: 0 35px 0 12px;
367 border: 1px solid #C6C6C6;
368 background: transparent none;
371 height: $button-height;
372 text-overflow: ellipsis;
373 color: pvar(--mainForegroundColor);
381 text-shadow: 0 0 0 #000;
389 &.peertube-select-button {
390 @include grey-button;
394 font-weight: $font-semibold;
395 color: pvar(--greyForegroundColor);
401 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
402 @mixin peertube-radio-container {
403 input[type="radio"] {
407 font-weight: $font-regular;
416 border: 1px solid #000;
417 display: inline-block;
420 vertical-align: middle;
427 &:checked + label:before {
428 background-color: #000;
429 box-shadow: inset 0 0 0 4px #fff;
432 &:focus + label:before {
439 @mixin peertube-checkbox ($border-width) {
444 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
452 border: $border-width solid #C6C6C6;
454 vertical-align: middle;
460 top: calc(2px - #{$border-width});
465 transform: rotate(45deg) scale(0);
466 border-right: 2px solid $bg-color;
467 border-bottom: 2px solid $bg-color;
472 border-color: transparent;
473 background: pvar(--mainColor);
474 animation: jelly 0.6s ease;
478 transform: rotate(45deg) scale(1);
484 font-weight: $font-regular;
491 &[disabled] + span + span{
499 padding: 1/4em 1/2em;
500 text-transform: uppercase;
501 font-weight: $font-bold;
503 letter-spacing: 1/3px;
507 background-color: #ffcdd2;
512 text-decoration: line-through;
516 background-color: #feedaf;
521 background-color: #ffd8b2;
526 background-color: #c8e6c9;
531 background-color: #b3e5fc;
536 background-color: #eccfff;
541 @mixin avatar ($size) {
550 @mixin channel-avatar ($size) {
558 @mixin chevron ($size, $border-width) {
560 border-width: $border-width $border-width 0 0;
562 display: inline-block;
563 transform: rotate(-45deg);
568 @mixin chevron-right ($size, $border-width) {
569 @include chevron($size, $border-width);
572 transform: rotate(45deg);
575 @mixin chevron-left ($size, $border-width) {
576 @include chevron($size, $border-width);
579 transform: rotate(-135deg);
582 @mixin in-content-small-title {
583 text-transform: uppercase;
584 color: pvar(--mainColor);
585 font-weight: $font-bold;
589 @mixin settings-big-title {
590 text-transform: uppercase;
591 color: pvar(--mainColor);
592 font-weight: $font-bold;
598 @include disable-default-a-behaviour;
602 color: pvar(--mainForegroundColor);
609 @include avatar(18px);
617 @mixin create-button {
618 @include peertube-button-link;
619 @include orange-button;
620 @include button-with-icon(20px, 5px, -1px);
626 padding-bottom: 20px;
628 border-bottom: 1px solid #C6C6C6;
630 @media screen and (max-width: 800px) {
631 flex-direction: column;
637 @mixin dropdown-with-icon-item {
650 @mixin progressbar($small: false) {
651 background-color: $grey-background-color;
656 border-radius: 0.25rem;
661 color: $grey-foreground-color;
675 color: pvar(--mainBackgroundColor);
676 background-color: pvar(--mainColor);
678 flex-direction: column;
679 justify-content: center;
682 transition: width 0.6s ease;
685 background-color: pvar(--secondaryColor);
689 background-color: lighten($color: #c54130, $amount: 10);
697 padding: 0.75rem 1rem;
700 background-color: pvar(--submenuBackgroundColor);
701 border-radius: 0.25rem;
707 color: pvar(--mainColor);
710 & + .breadcrumb-item {
711 padding-left: 0.5rem;
713 display: inline-block;
714 padding-right: 0.5rem;
732 box-sizing: border-box;
733 flex: 0 0 percentage(1/3);
738 @include disable-default-a-behaviour;
740 text-decoration: none;
755 background: pvar(--submenuBackgroundColor);
757 box-sizing: border-box;
762 .dashboard-num, .dashboard-text {
765 color: pvar(--mainForegroundColor);
772 color: pvar(--inputPlaceholderColor);
777 @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) {
779 border-top: .05rem solid $color;
789 background: $background;
791 content: attr(data-content);
792 display: inline-block;
795 transform: translateY(-.65rem);
802 --chip-padding: .2rem .4rem;
803 $avatar-height: 1.2rem;
806 border-radius: var(--chip-radius);
807 display: inline-flex;
809 color: pvar(--mainForegroundColor);
810 height: $avatar-height;
815 padding: var(--chip-padding);
816 text-decoration: none;
817 text-overflow: ellipsis;
818 vertical-align: middle;
822 --chip-radius: .2rem;
823 --chip-padding: .2rem .3rem;
829 height: $avatar-height;
830 width: $avatar-height;
833 display: inline-block;
836 vertical-align: middle;
840 $avatar-height: 2rem;
842 height: $avatar-height;
845 height: $avatar-height;
846 width: $avatar-height;
851 flex-direction: column;
852 height: $avatar-height;
855 justify-content: center;
860 @mixin admin-sub-header-responsive {
861 flex-direction: column;
864 margin-right: 0px !important;
883 // applies 16:9 ratio to a child element (using $selector) only using
884 // an immediate's parent size. This allows 16:9 ratio without explicit
885 // dimensions, as width/height cannot be computed from each other.
886 @mixin large-screen-ratio ($selector: 'div') {
904 border-bottom: 2px solid $grey-background-color;
905 padding-bottom: 15px;
906 margin-bottom: $sub-menu-margin-bottom;
910 vertical-align: bottom;
921 @mixin play-icon ($width, $height) {
928 transform: translate(-50%, -50%) scale(0.5);
930 border-top: ($height / 2) solid transparent;
931 border-bottom: ($height / 2) solid transparent;
933 border-left: $width solid rgba(255, 255, 255, 0.95);