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 sub-menu-with-actor {
620 flex-direction: column;
621 align-items: flex-start;
629 @include avatar(80px);
636 flex-direction: column;
637 justify-content: center;
644 .actor-display-name {
646 font-weight: $font-bold;
654 color: $grey-actor-name;
667 @include actor-owner;
679 text-transform: uppercase;
683 @media screen and (max-width: $mobile-view) {
689 display: inline-block;
695 @mixin create-button {
696 @include peertube-button-link;
697 @include orange-button;
698 @include button-with-icon(20px, 5px, -1px);
704 padding-bottom: 20px;
706 border-bottom: 1px solid #C6C6C6;
708 @media screen and (max-width: 800px) {
709 flex-direction: column;
715 @mixin dropdown-with-icon-item {
728 @mixin progressbar($small: false) {
729 background-color: $grey-background-color;
734 border-radius: 0.25rem;
739 color: $grey-foreground-color;
753 color: pvar(--mainBackgroundColor);
754 background-color: pvar(--mainColor);
756 flex-direction: column;
757 justify-content: center;
760 transition: width 0.6s ease;
763 background-color: pvar(--secondaryColor);
767 background-color: lighten($color: #c54130, $amount: 10);
775 padding: 0.75rem 1rem;
778 background-color: pvar(--submenuColor);
779 border-radius: 0.25rem;
785 color: pvar(--mainColor);
788 & + .breadcrumb-item {
789 padding-left: 0.5rem;
791 display: inline-block;
792 padding-right: 0.5rem;
810 box-sizing: border-box;
811 flex: 0 0 percentage(1/3);
816 @include disable-default-a-behaviour;
818 text-decoration: none;
833 background: pvar(--submenuColor);
835 box-sizing: border-box;
840 .dashboard-num, .dashboard-text {
843 color: pvar(--mainForegroundColor);
850 color: pvar(--inputPlaceholderColor);
855 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
857 border-top: .05rem solid $color;
867 background: $background;
869 content: attr(data-content);
870 display: inline-block;
873 transform: translateY(-.65rem);
880 --chip-padding: .2rem .4rem;
881 $avatar-height: 1.2rem;
884 border-radius: var(--chip-radius);
885 display: inline-flex;
887 color: pvar(--mainForegroundColor);
888 height: $avatar-height;
893 padding: var(--chip-padding);
894 text-decoration: none;
895 text-overflow: ellipsis;
896 vertical-align: middle;
900 --chip-radius: .2rem;
901 --chip-padding: .2rem .3rem;
907 height: $avatar-height;
908 width: $avatar-height;
911 display: inline-block;
914 vertical-align: middle;
918 $avatar-height: 2rem;
920 height: $avatar-height;
923 height: $avatar-height;
924 width: $avatar-height;
929 flex-direction: column;
930 height: $avatar-height;
933 justify-content: center;
938 @mixin admin-sub-header-responsive ($horizontal-margins) {
939 flex-direction: column;
942 margin-right: 0px !important;
953 width: calc(100vw - #{$horizontal-margins*2});
961 // applies 16:9 ratio to a child element (using $selector) only using
962 // an immediate's parent size. This allows 16:9 ratio without explicit
963 // dimensions, as width/height cannot be computed from each other.
964 @mixin large-screen-ratio ($selector: 'div') {
982 border-bottom: 2px solid $grey-background-color;
983 padding-bottom: 15px;
984 margin-bottom: $sub-menu-margin-bottom;
988 vertical-align: bottom;
999 @mixin play-icon ($width, $height) {
1006 transform: translate(-50%, -50%) scale(0.5);
1008 border-top: ($height / 2) solid transparent;
1009 border-bottom: ($height / 2) solid transparent;
1011 border-left: $width solid rgba(255, 255, 255, 0.95);