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;
309 @mixin ng-select ($width) {
310 ::ng-deep &.ng-select,
311 ::ng-deep .ng-select {
314 @media screen and (max-width: $width) {
320 @mixin peertube-select-container ($width) {
325 color: pvar(--inputForegroundColor);
326 background: pvar(--inputBackgroundColor);
331 background-color: #E5E5E5;
338 @media screen and (max-width: $width) {
343 @include select-arrow-down;
347 padding: 0 35px 0 12px;
349 border: 1px solid #C6C6C6;
350 background: transparent none;
353 height: $button-height;
354 text-overflow: ellipsis;
355 color: pvar(--mainForegroundColor);
363 text-shadow: 0 0 0 #000;
371 &.peertube-select-button {
372 @include grey-button;
376 font-weight: $font-semibold;
377 color: pvar(--greyForegroundColor);
383 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
384 @mixin peertube-radio-container {
385 input[type="radio"] {
389 font-weight: $font-regular;
398 border: 1px solid #000;
399 display: inline-block;
402 vertical-align: middle;
409 &:checked + label:before {
410 background-color: #000;
411 box-shadow: inset 0 0 0 4px #fff;
414 &:focus + label:before {
421 @mixin peertube-checkbox ($border-width) {
426 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
434 border: $border-width solid #C6C6C6;
436 vertical-align: middle;
442 top: calc(2px - #{$border-width});
447 transform: rotate(45deg) scale(0);
448 border-right: 2px solid $bg-color;
449 border-bottom: 2px solid $bg-color;
454 border-color: transparent;
455 background: pvar(--mainColor);
456 animation: jelly 0.6s ease;
460 transform: rotate(45deg) scale(1);
466 font-weight: $font-regular;
473 &[disabled] + span + span{
481 padding: 1/4em 1/2em;
482 text-transform: uppercase;
483 font-weight: $font-bold;
485 letter-spacing: 1/3px;
489 background-color: #ffcdd2;
494 text-decoration: line-through;
498 background-color: #feedaf;
503 background-color: #ffd8b2;
508 background-color: #c8e6c9;
513 background-color: #b3e5fc;
518 background-color: #eccfff;
523 @mixin avatar ($size) {
532 @mixin chevron ($size, $border-width) {
534 border-width: $border-width $border-width 0 0;
536 display: inline-block;
537 transform: rotate(-45deg);
542 @mixin chevron-right ($size, $border-width) {
543 @include chevron($size, $border-width);
546 transform: rotate(45deg);
549 @mixin chevron-left ($size, $border-width) {
550 @include chevron($size, $border-width);
553 transform: rotate(-135deg);
556 @mixin in-content-small-title {
557 text-transform: uppercase;
558 color: pvar(--mainColor);
559 font-weight: $font-bold;
563 @mixin settings-big-title {
564 text-transform: uppercase;
565 color: pvar(--mainColor);
566 font-weight: $font-bold;
572 @include disable-default-a-behaviour;
576 color: pvar(--mainForegroundColor);
583 @include avatar(18px);
591 @mixin sub-menu-with-actor {
596 flex-direction: column;
597 align-items: flex-start;
605 @include avatar(80px);
612 flex-direction: column;
613 justify-content: center;
620 .actor-display-name {
622 font-weight: $font-bold;
630 color: $grey-actor-name;
643 @include actor-owner;
655 text-transform: uppercase;
659 @media screen and (max-width: $mobile-view) {
666 @mixin create-button {
667 @include peertube-button-link;
668 @include orange-button;
669 @include button-with-icon(20px, 5px, -1px);
675 padding-bottom: 20px;
677 border-bottom: 1px solid #C6C6C6;
679 @media screen and (max-width: 800px) {
680 flex-direction: column;
686 @mixin dropdown-with-icon-item {
699 @mixin progressbar($small: false) {
700 background-color: $grey-background-color;
705 border-radius: 0.25rem;
710 color: $grey-foreground-color;
724 color: pvar(--mainBackgroundColor);
725 background-color: pvar(--mainColor);
727 flex-direction: column;
728 justify-content: center;
731 transition: width 0.6s ease;
734 background-color: pvar(--secondaryColor);
738 background-color: lighten($color: #c54130, $amount: 10);
746 padding: 0.75rem 1rem;
749 background-color: pvar(--submenuColor);
750 border-radius: 0.25rem;
756 color: pvar(--mainColor);
759 & + .breadcrumb-item {
760 padding-left: 0.5rem;
762 display: inline-block;
763 padding-right: 0.5rem;
781 box-sizing: border-box;
782 flex: 0 0 percentage(1/3);
787 @include disable-default-a-behaviour;
789 text-decoration: none;
804 background: pvar(--submenuColor);
806 box-sizing: border-box;
811 .dashboard-num, .dashboard-text {
815 color: pvar(--mainForegroundColor);
822 color: pvar(--inputPlaceholderColor);
827 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
829 border-top: .05rem solid $color;
839 background: $background;
841 content: attr(data-content);
842 display: inline-block;
845 transform: translateY(-.65rem);
852 --chip-padding: .2rem .4rem;
853 $avatar-height: 1.2rem;
856 border-radius: var(--chip-radius);
857 display: inline-flex;
859 color: pvar(--mainForegroundColor);
860 height: $avatar-height;
865 padding: var(--chip-padding);
866 text-decoration: none;
867 text-overflow: ellipsis;
868 vertical-align: middle;
872 --chip-radius: .2rem;
873 --chip-padding: .2rem .3rem;
879 height: $avatar-height;
880 width: $avatar-height;
883 display: inline-block;
886 vertical-align: middle;
890 $avatar-height: 2rem;
892 height: $avatar-height;
895 height: $avatar-height;
896 width: $avatar-height;
901 flex-direction: column;
902 height: $avatar-height;
905 justify-content: center;
910 @mixin admin-sub-header-responsive ($horizontal-margins) {
911 flex-direction: column;
914 margin-right: 0px !important;
925 width: calc(100vw - #{$horizontal-margins*2});
933 // applies 16:9 ratio to a child element (using $selector) only using
934 // an immediate's parent size. This allows 16:9 ratio without explicit
935 // dimensions, as width/height cannot be computed from each other.
936 @mixin large-screen-ratio ($selector: 'div') {
954 border-bottom: 2px solid $grey-background-color;
955 padding-bottom: 15px;
956 margin-bottom: $sub-menu-margin-bottom;
960 vertical-align: bottom;
971 @mixin play-icon ($width, $height) {
978 transform: translate(-50%, -50%) scale(0.5);
980 border-top: ($height / 2) solid transparent;
981 border-bottom: ($height / 2) solid transparent;
983 border-left: $width solid rgba(255, 255, 255, 0.95);