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-semibold;
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) {
557 @mixin chevron ($size, $border-width) {
559 border-width: $border-width $border-width 0 0;
561 display: inline-block;
562 transform: rotate(-45deg);
567 @mixin chevron-right ($size, $border-width) {
568 @include chevron($size, $border-width);
571 transform: rotate(45deg);
574 @mixin chevron-left ($size, $border-width) {
575 @include chevron($size, $border-width);
578 transform: rotate(-135deg);
581 @mixin in-content-small-title {
582 text-transform: uppercase;
583 color: pvar(--mainColor);
584 font-weight: $font-bold;
588 @mixin settings-big-title {
589 text-transform: uppercase;
590 color: pvar(--mainColor);
591 font-weight: $font-bold;
597 @include disable-default-a-behaviour;
601 color: pvar(--mainForegroundColor);
608 @include avatar(18px);
616 @mixin create-button {
617 @include peertube-button-link;
618 @include orange-button;
619 @include button-with-icon(20px, 5px, -1px);
625 padding-bottom: 20px;
627 border-bottom: 1px solid #C6C6C6;
629 @media screen and (max-width: 800px) {
630 flex-direction: column;
636 @mixin dropdown-with-icon-item {
649 @mixin progressbar($small: false) {
650 background-color: $grey-background-color;
655 border-radius: 0.25rem;
660 color: $grey-foreground-color;
674 color: pvar(--mainBackgroundColor);
675 background-color: pvar(--mainColor);
677 flex-direction: column;
678 justify-content: center;
681 transition: width 0.6s ease;
684 background-color: pvar(--secondaryColor);
688 background-color: lighten($color: #c54130, $amount: 10);
696 padding: 0.75rem 1rem;
699 background-color: pvar(--submenuColor);
700 border-radius: 0.25rem;
706 color: pvar(--mainColor);
709 & + .breadcrumb-item {
710 padding-left: 0.5rem;
712 display: inline-block;
713 padding-right: 0.5rem;
731 box-sizing: border-box;
732 flex: 0 0 percentage(1/3);
737 @include disable-default-a-behaviour;
739 text-decoration: none;
754 background: pvar(--submenuColor);
756 box-sizing: border-box;
761 .dashboard-num, .dashboard-text {
764 color: pvar(--mainForegroundColor);
771 color: pvar(--inputPlaceholderColor);
776 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
778 border-top: .05rem solid $color;
788 background: $background;
790 content: attr(data-content);
791 display: inline-block;
794 transform: translateY(-.65rem);
801 --chip-padding: .2rem .4rem;
802 $avatar-height: 1.2rem;
805 border-radius: var(--chip-radius);
806 display: inline-flex;
808 color: pvar(--mainForegroundColor);
809 height: $avatar-height;
814 padding: var(--chip-padding);
815 text-decoration: none;
816 text-overflow: ellipsis;
817 vertical-align: middle;
821 --chip-radius: .2rem;
822 --chip-padding: .2rem .3rem;
828 height: $avatar-height;
829 width: $avatar-height;
832 display: inline-block;
835 vertical-align: middle;
839 $avatar-height: 2rem;
841 height: $avatar-height;
844 height: $avatar-height;
845 width: $avatar-height;
850 flex-direction: column;
851 height: $avatar-height;
854 justify-content: center;
859 @mixin admin-sub-header-responsive ($horizontal-margins) {
860 flex-direction: column;
863 margin-right: 0px !important;
874 width: calc(100vw - #{$horizontal-margins*2});
882 // applies 16:9 ratio to a child element (using $selector) only using
883 // an immediate's parent size. This allows 16:9 ratio without explicit
884 // dimensions, as width/height cannot be computed from each other.
885 @mixin large-screen-ratio ($selector: 'div') {
903 border-bottom: 2px solid $grey-background-color;
904 padding-bottom: 15px;
905 margin-bottom: $sub-menu-margin-bottom;
909 vertical-align: bottom;
920 @mixin play-icon ($width, $height) {
927 transform: translate(-50%, -50%) scale(0.5);
929 border-top: ($height / 2) solid transparent;
930 border-bottom: ($height / 2) solid transparent;
932 border-left: $width solid rgba(255, 255, 255, 0.95);