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);
183 background-color: $grey-background-color;
184 color: pvar(--greyForegroundColor);
186 &:hover, &:active, &:focus, &[disabled], &.disabled {
187 color: pvar(--greyForegroundColor);
188 background-color: $grey-background-hover-color;
191 &[disabled], &.disabled {
196 @include apply-svg-color(pvar(--greyForegroundColor))
200 @mixin danger-button {
201 $color: lighten($color: #c54130, $amount: 10);
204 @include button-focus(scale-color($color, $alpha: -95%));
205 background-color: $color;
208 &:hover, &:active, &:focus, &[disabled], &.disabled {
209 background-color: lighten($color: $color, $amount: 10);
212 &[disabled], &.disabled {
217 @include apply-svg-color($text)
221 @mixin peertube-button {
223 font-weight: $font-semibold;
225 height: $button-height;
226 line-height: $button-height;
229 padding: 0 17px 0 13px;
233 @mixin peertube-button-link {
234 display: inline-block;
236 @include disable-default-a-behaviour;
237 @include peertube-button;
240 @mixin peertube-button-outline {
241 display: inline-block;
243 @include disable-default-a-behaviour;
244 @include peertube-button;
249 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
253 margin-right: $margin-right;
258 @mixin peertube-button-file ($width) {
261 display: inline-block;
265 @include peertube-button;
275 filter: alpha(opacity=0);
284 @mixin icon ($size) {
285 display: inline-block;
286 background-repeat: no-repeat;
287 background-size: contain;
290 vertical-align: middle;
294 @mixin select-arrow-down {
296 right: calc(0% + 15px);
301 pointer-events: none;
302 border: 5px solid rgba(0, 0, 0, 0);
303 border-top-color: #000;
308 @mixin responsive-width ($width) {
311 @media screen and (max-width: $width) {
316 @mixin peertube-select-container ($width) {
321 color: pvar(--inputForegroundColor);
322 background: pvar(--inputBackgroundColor);
327 background-color: #E5E5E5;
334 @media screen and (max-width: $width) {
339 @include select-arrow-down;
343 padding: 0 35px 0 12px;
345 border: 1px solid #C6C6C6;
346 background: transparent none;
349 height: $button-height;
350 text-overflow: ellipsis;
351 color: pvar(--mainForegroundColor);
359 text-shadow: 0 0 0 #000;
367 &.peertube-select-button {
368 @include grey-button;
372 font-weight: $font-semibold;
373 color: pvar(--greyForegroundColor);
379 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
380 @mixin peertube-radio-container {
381 input[type="radio"] {
385 font-weight: $font-regular;
394 border: 1px solid #000;
395 display: inline-block;
398 vertical-align: middle;
405 &:checked + label:before {
406 background-color: #000;
407 box-shadow: inset 0 0 0 4px #fff;
410 &:focus + label:before {
417 @mixin peertube-checkbox ($border-width) {
422 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
430 border: $border-width solid #C6C6C6;
432 vertical-align: middle;
438 top: calc(2px - #{$border-width});
443 transform: rotate(45deg) scale(0);
444 border-right: 2px solid $bg-color;
445 border-bottom: 2px solid $bg-color;
450 border-color: transparent;
451 background: pvar(--mainColor);
452 animation: jelly 0.6s ease;
456 transform: rotate(45deg) scale(1);
462 font-weight: $font-regular;
469 &[disabled] + span + span{
477 padding: 1/4em 1/2em;
478 text-transform: uppercase;
479 font-weight: $font-bold;
481 letter-spacing: 1/3px;
485 background-color: #ffcdd2;
490 text-decoration: line-through;
494 background-color: #feedaf;
499 background-color: #ffd8b2;
504 background-color: #c8e6c9;
509 background-color: #b3e5fc;
514 background-color: #eccfff;
519 @mixin avatar ($size) {
528 @mixin chevron ($size, $border-width) {
530 border-width: $border-width $border-width 0 0;
532 display: inline-block;
533 transform: rotate(-45deg);
538 @mixin chevron-right ($size, $border-width) {
539 @include chevron($size, $border-width);
542 transform: rotate(45deg);
545 @mixin chevron-left ($size, $border-width) {
546 @include chevron($size, $border-width);
549 transform: rotate(-135deg);
552 @mixin in-content-small-title {
553 text-transform: uppercase;
554 color: pvar(--mainColor);
555 font-weight: $font-bold;
559 @mixin settings-big-title {
560 text-transform: uppercase;
561 color: pvar(--mainColor);
562 font-weight: $font-bold;
568 @include disable-default-a-behaviour;
572 color: pvar(--mainForegroundColor);
579 @include avatar(18px);
587 @mixin sub-menu-with-actor {
592 flex-direction: column;
593 align-items: flex-start;
601 @include avatar(80px);
608 flex-direction: column;
609 justify-content: center;
616 .actor-display-name {
618 font-weight: $font-bold;
626 color: $grey-actor-name;
639 @include actor-owner;
651 text-transform: uppercase;
655 @media screen and (max-width: $mobile-view) {
662 @mixin create-button {
663 @include peertube-button-link;
664 @include orange-button;
665 @include button-with-icon(20px, 5px, -1px);
671 padding-bottom: 20px;
673 border-bottom: 1px solid #C6C6C6;
675 @media screen and (max-width: 800px) {
676 flex-direction: column;
682 @mixin dropdown-with-icon-item {
695 @mixin progressbar($small: false) {
696 background-color: $grey-background-color;
701 border-radius: 0.25rem;
706 color: $grey-foreground-color;
720 color: pvar(--mainBackgroundColor);
721 background-color: pvar(--mainColor);
723 flex-direction: column;
724 justify-content: center;
727 transition: width 0.6s ease;
730 background-color: pvar(--secondaryColor);
734 background-color: lighten($color: #c54130, $amount: 10);
742 padding: 0.75rem 1rem;
745 background-color: pvar(--submenuColor);
746 border-radius: 0.25rem;
752 color: pvar(--mainColor);
755 & + .breadcrumb-item {
756 padding-left: 0.5rem;
758 display: inline-block;
759 padding-right: 0.5rem;
777 box-sizing: border-box;
778 flex: 0 0 percentage(1/3);
783 @include disable-default-a-behaviour;
785 text-decoration: none;
800 background: pvar(--submenuColor);
802 box-sizing: border-box;
807 .dashboard-num, .dashboard-text {
811 color: pvar(--mainForegroundColor);
818 color: pvar(--inputPlaceholderColor);
823 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
825 border-top: .05rem solid $color;
835 background: $background;
837 content: attr(data-content);
838 display: inline-block;
841 transform: translateY(-.65rem);
848 --chip-padding: .2rem .4rem;
849 $avatar-height: 1.2rem;
852 border-radius: var(--chip-radius);
853 display: inline-flex;
855 color: pvar(--mainForegroundColor);
856 height: $avatar-height;
861 padding: var(--chip-padding);
862 text-decoration: none;
863 text-overflow: ellipsis;
864 vertical-align: middle;
868 --chip-radius: .2rem;
869 --chip-padding: .2rem .3rem;
875 height: $avatar-height;
876 width: $avatar-height;
879 display: inline-block;
882 vertical-align: middle;
886 $avatar-height: 2rem;
888 height: $avatar-height;
891 height: $avatar-height;
892 width: $avatar-height;
897 flex-direction: column;
898 height: $avatar-height;
901 justify-content: center;
906 @mixin admin-sub-header-responsive ($horizontal-margins) {
907 flex-direction: column;
910 margin-right: 0px !important;
921 width: calc(100vw - #{$horizontal-margins*2});
929 // applies 16:9 ratio to a child element (using $selector) only using
930 // an immediate's parent size. This allows 16:9 ratio without explicit
931 // dimensions, as width/height cannot be computed from each other.
932 @mixin large-screen-ratio ($selector: 'div') {
950 border-bottom: 2px solid $grey-background-color;
951 padding-bottom: 15px;
952 margin-bottom: $sub-menu-margin-bottom;
956 vertical-align: bottom;
967 @mixin play-icon ($width, $height) {
974 transform: translate(-50%, -50%) scale(0.5);
976 border-top: ($height / 2) solid transparent;
977 border-bottom: ($height / 2) solid transparent;
979 border-left: $width solid rgba(255, 255, 255, 0.95);