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;
132 @mixin peertube-textarea ($width, $height) {
133 @include peertube-input-text($width);
135 color: pvar(--textareaForegroundColor);
136 background-color: pvar(--textareaBackgroundColor);
142 @mixin orange-button {
143 @include button-focus(pvar(--mainColorLightest));
145 &, &:active, &:focus {
147 background-color: pvar(--mainColor);
152 background-color: pvar(--mainHoverColor);
155 &[disabled], &.disabled {
158 background-color: #C6C6C6;
162 @include apply-svg-color(#fff)
166 @mixin tertiary-button {
167 @include button-focus($grey-button-outline-color);
169 color: pvar(--greyForegroundColor);
170 background-color: transparent;
172 &[disabled], &.disabled {
177 @include apply-svg-color(transparent)
182 @include button-focus($grey-button-outline-color);
184 background-color: $grey-background-color;
185 color: pvar(--greyForegroundColor);
187 &:hover, &:active, &:focus, &[disabled], &.disabled {
188 color: pvar(--greyForegroundColor);
189 background-color: $grey-background-hover-color;
192 &[disabled], &.disabled {
197 @include apply-svg-color(pvar(--greyForegroundColor))
201 @mixin danger-button {
202 $color: lighten($color: #c54130, $amount: 10);
205 @include button-focus(scale-color($color, $alpha: -95%));
206 background-color: $color;
209 &:hover, &:active, &:focus, &[disabled], &.disabled {
210 background-color: lighten($color: $color, $amount: 10);
213 &[disabled], &.disabled {
218 @include apply-svg-color($text)
222 @mixin peertube-button {
224 font-weight: $font-semibold;
226 height: $button-height;
227 line-height: $button-height;
230 padding: 0 17px 0 13px;
234 @mixin peertube-button-link {
235 display: inline-block;
237 @include disable-default-a-behaviour;
238 @include peertube-button;
241 @mixin peertube-button-outline {
242 display: inline-block;
244 @include disable-default-a-behaviour;
245 @include peertube-button;
250 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
251 display: inline-flex;
253 line-height: normal !important;
258 margin-right: $margin-right;
263 @mixin peertube-file {
266 display: inline-block;
277 filter: alpha(opacity=0);
286 @mixin peertube-button-file ($width) {
289 @include peertube-file;
290 @include peertube-button;
293 @mixin icon ($size) {
294 display: inline-block;
295 background-repeat: no-repeat;
296 background-size: contain;
299 vertical-align: middle;
303 @mixin select-arrow-down {
305 right: calc(0% + 15px);
310 pointer-events: none;
311 border: 5px solid rgba(0, 0, 0, 0);
312 border-top-color: #000;
317 @mixin responsive-width ($width) {
320 @media screen and (max-width: $width) {
325 @mixin peertube-select-container ($width) {
330 color: pvar(--inputForegroundColor);
331 background: pvar(--inputBackgroundColor);
336 background-color: #E5E5E5;
343 @media screen and (max-width: $width) {
348 @include select-arrow-down;
352 padding: 0 35px 0 12px;
354 border: 1px solid #C6C6C6;
355 background: transparent none;
358 height: $button-height;
359 text-overflow: ellipsis;
360 color: pvar(--mainForegroundColor);
368 text-shadow: 0 0 0 #000;
376 &.peertube-select-button {
377 @include grey-button;
381 font-weight: $font-semibold;
382 color: pvar(--greyForegroundColor);
388 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
389 @mixin peertube-radio-container {
390 input[type="radio"] {
394 font-weight: $font-regular;
403 border: 1px solid #000;
404 display: inline-block;
407 vertical-align: middle;
414 &:checked + label:before {
415 background-color: #000;
416 box-shadow: inset 0 0 0 4px #fff;
419 &:focus + label:before {
426 @mixin peertube-checkbox ($border-width) {
431 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
439 border: $border-width solid #C6C6C6;
441 vertical-align: middle;
447 top: calc(2px - #{$border-width});
452 transform: rotate(45deg) scale(0);
453 border-right: 2px solid $bg-color;
454 border-bottom: 2px solid $bg-color;
459 border-color: transparent;
460 background: pvar(--mainColor);
461 animation: jelly 0.6s ease;
465 transform: rotate(45deg) scale(1);
471 font-weight: $font-regular;
478 &[disabled] + span + span{
486 padding: 1/4em 1/2em;
487 text-transform: uppercase;
488 font-weight: $font-bold;
490 letter-spacing: 1/3px;
494 background-color: #ffcdd2;
499 text-decoration: line-through;
503 background-color: #feedaf;
508 background-color: #ffd8b2;
513 background-color: #c8e6c9;
518 background-color: #b3e5fc;
523 background-color: #eccfff;
528 @mixin avatar ($size) {
537 @mixin chevron ($size, $border-width) {
539 border-width: $border-width $border-width 0 0;
541 display: inline-block;
542 transform: rotate(-45deg);
547 @mixin chevron-right ($size, $border-width) {
548 @include chevron($size, $border-width);
551 transform: rotate(45deg);
554 @mixin chevron-left ($size, $border-width) {
555 @include chevron($size, $border-width);
558 transform: rotate(-135deg);
561 @mixin in-content-small-title {
562 text-transform: uppercase;
563 color: pvar(--mainColor);
564 font-weight: $font-bold;
568 @mixin settings-big-title {
569 text-transform: uppercase;
570 color: pvar(--mainColor);
571 font-weight: $font-bold;
577 @include disable-default-a-behaviour;
581 color: pvar(--mainForegroundColor);
588 @include avatar(18px);
596 @mixin sub-menu-with-actor {
601 flex-direction: column;
602 align-items: flex-start;
610 @include avatar(80px);
617 flex-direction: column;
618 justify-content: center;
625 .actor-display-name {
627 font-weight: $font-bold;
635 color: $grey-actor-name;
648 @include actor-owner;
660 text-transform: uppercase;
664 @media screen and (max-width: $mobile-view) {
670 display: inline-block;
676 @mixin create-button {
677 @include peertube-button-link;
678 @include orange-button;
679 @include button-with-icon(20px, 5px, -1px);
685 padding-bottom: 20px;
687 border-bottom: 1px solid #C6C6C6;
689 @media screen and (max-width: 800px) {
690 flex-direction: column;
696 @mixin dropdown-with-icon-item {
709 @mixin progressbar($small: false) {
710 background-color: $grey-background-color;
715 border-radius: 0.25rem;
720 color: $grey-foreground-color;
734 color: pvar(--mainBackgroundColor);
735 background-color: pvar(--mainColor);
737 flex-direction: column;
738 justify-content: center;
741 transition: width 0.6s ease;
744 background-color: pvar(--secondaryColor);
748 background-color: lighten($color: #c54130, $amount: 10);
756 padding: 0.75rem 1rem;
759 background-color: pvar(--submenuColor);
760 border-radius: 0.25rem;
766 color: pvar(--mainColor);
769 & + .breadcrumb-item {
770 padding-left: 0.5rem;
772 display: inline-block;
773 padding-right: 0.5rem;
791 box-sizing: border-box;
792 flex: 0 0 percentage(1/3);
797 @include disable-default-a-behaviour;
799 text-decoration: none;
814 background: pvar(--submenuColor);
816 box-sizing: border-box;
821 .dashboard-num, .dashboard-text {
824 color: pvar(--mainForegroundColor);
831 color: pvar(--inputPlaceholderColor);
836 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
838 border-top: .05rem solid $color;
848 background: $background;
850 content: attr(data-content);
851 display: inline-block;
854 transform: translateY(-.65rem);
861 --chip-padding: .2rem .4rem;
862 $avatar-height: 1.2rem;
865 border-radius: var(--chip-radius);
866 display: inline-flex;
868 color: pvar(--mainForegroundColor);
869 height: $avatar-height;
874 padding: var(--chip-padding);
875 text-decoration: none;
876 text-overflow: ellipsis;
877 vertical-align: middle;
881 --chip-radius: .2rem;
882 --chip-padding: .2rem .3rem;
888 height: $avatar-height;
889 width: $avatar-height;
892 display: inline-block;
895 vertical-align: middle;
899 $avatar-height: 2rem;
901 height: $avatar-height;
904 height: $avatar-height;
905 width: $avatar-height;
910 flex-direction: column;
911 height: $avatar-height;
914 justify-content: center;
919 @mixin admin-sub-header-responsive ($horizontal-margins) {
920 flex-direction: column;
923 margin-right: 0px !important;
934 width: calc(100vw - #{$horizontal-margins*2});
942 // applies 16:9 ratio to a child element (using $selector) only using
943 // an immediate's parent size. This allows 16:9 ratio without explicit
944 // dimensions, as width/height cannot be computed from each other.
945 @mixin large-screen-ratio ($selector: 'div') {
963 border-bottom: 2px solid $grey-background-color;
964 padding-bottom: 15px;
965 margin-bottom: $sub-menu-margin-bottom;
969 vertical-align: bottom;
980 @mixin play-icon ($width, $height) {
987 transform: translate(-50%, -50%) scale(0.5);
989 border-top: ($height / 2) solid transparent;
990 border-bottom: ($height / 2) solid transparent;
992 border-left: $width solid rgba(255, 255, 255, 0.95);