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;
131 @mixin peertube-textarea ($width, $height) {
132 @include peertube-input-text($width);
134 color: pvar(--textareaForegroundColor);
135 background-color: pvar(--textareaBackgroundColor);
141 @mixin orange-button {
142 @include button-focus(pvar(--mainColorLightest));
144 &, &:active, &:focus {
146 background-color: pvar(--mainColor);
151 background-color: pvar(--mainHoverColor);
154 &[disabled], &.disabled {
157 background-color: #C6C6C6;
161 @include apply-svg-color(#fff)
165 @mixin tertiary-button {
166 @include button-focus($grey-button-outline-color);
168 color: pvar(--greyForegroundColor);
169 background-color: transparent;
171 &[disabled], &.disabled {
176 @include apply-svg-color(transparent)
181 @include button-focus($grey-button-outline-color);
182 background-color: $grey-background-color;
183 color: pvar(--greyForegroundColor);
185 &:hover, &:active, &:focus, &[disabled], &.disabled {
186 color: pvar(--greyForegroundColor);
187 background-color: $grey-background-hover-color;
190 &[disabled], &.disabled {
195 @include apply-svg-color(pvar(--greyForegroundColor))
199 @mixin danger-button {
200 $color: lighten($color: #c54130, $amount: 10);
203 @include button-focus(scale-color($color, $alpha: -95%));
204 background-color: $color;
207 &:hover, &:active, &:focus, &[disabled], &.disabled {
208 background-color: lighten($color: $color, $amount: 10);
211 &[disabled], &.disabled {
216 @include apply-svg-color($text)
220 @mixin peertube-button {
222 font-weight: $font-semibold;
224 height: $button-height;
225 line-height: $button-height;
228 padding: 0 17px 0 13px;
232 @mixin peertube-button-link {
233 display: inline-block;
235 @include disable-default-a-behaviour;
236 @include peertube-button;
239 @mixin peertube-button-outline {
240 display: inline-block;
242 @include disable-default-a-behaviour;
243 @include peertube-button;
248 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
252 margin-right: $margin-right;
257 @mixin peertube-button-file ($width) {
260 display: inline-block;
264 @include peertube-button;
274 filter: alpha(opacity=0);
283 @mixin icon ($size) {
284 display: inline-block;
285 background-repeat: no-repeat;
286 background-size: contain;
289 vertical-align: middle;
293 @mixin select-arrow-down {
295 right: calc(0% + 15px);
300 pointer-events: none;
301 border: 5px solid rgba(0, 0, 0, 0);
302 border-top-color: #000;
307 @mixin peertube-select-container ($width) {
312 color: pvar(--inputForegroundColor);
313 background: pvar(--inputBackgroundColor);
318 background-color: #E5E5E5;
325 @media screen and (max-width: $width) {
330 @include select-arrow-down;
334 padding: 0 35px 0 12px;
336 border: 1px solid #C6C6C6;
337 background: transparent none;
340 height: $button-height;
341 text-overflow: ellipsis;
342 color: pvar(--mainForegroundColor);
350 text-shadow: 0 0 0 #000;
358 &.peertube-select-button {
359 @include grey-button;
363 font-weight: $font-semibold;
364 color: pvar(--greyForegroundColor);
370 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
371 @mixin peertube-radio-container {
372 input[type="radio"] {
376 font-weight: $font-regular;
385 border: 1px solid #000;
386 display: inline-block;
389 vertical-align: middle;
396 &:checked + label:before {
397 background-color: #000;
398 box-shadow: inset 0 0 0 4px #fff;
401 &:focus + label:before {
408 @mixin peertube-checkbox ($border-width) {
413 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
421 border: $border-width solid #C6C6C6;
423 vertical-align: middle;
429 top: calc(2px - #{$border-width});
434 transform: rotate(45deg) scale(0);
435 border-right: 2px solid $bg-color;
436 border-bottom: 2px solid $bg-color;
441 border-color: transparent;
442 background: pvar(--mainColor);
443 animation: jelly 0.6s ease;
447 transform: rotate(45deg) scale(1);
453 font-weight: $font-regular;
460 &[disabled] + span + span{
468 padding: 1/4em 1/2em;
469 text-transform: uppercase;
470 font-weight: $font-bold;
472 letter-spacing: 1/3px;
476 background-color: #ffcdd2;
481 text-decoration: line-through;
485 background-color: #feedaf;
490 background-color: #ffd8b2;
495 background-color: #c8e6c9;
500 background-color: #b3e5fc;
505 background-color: #eccfff;
510 @mixin avatar ($size) {
519 @mixin chevron ($size, $border-width) {
521 border-width: $border-width $border-width 0 0;
523 display: inline-block;
524 transform: rotate(-45deg);
529 @mixin chevron-right ($size, $border-width) {
530 @include chevron($size, $border-width);
533 transform: rotate(45deg);
536 @mixin chevron-left ($size, $border-width) {
537 @include chevron($size, $border-width);
540 transform: rotate(-135deg);
543 @mixin in-content-small-title {
544 text-transform: uppercase;
545 color: pvar(--mainColor);
546 font-weight: $font-bold;
550 @mixin settings-big-title {
551 text-transform: uppercase;
552 color: pvar(--mainColor);
553 font-weight: $font-bold;
559 @include disable-default-a-behaviour;
563 color: pvar(--mainForegroundColor);
570 @include avatar(18px);
578 @mixin sub-menu-with-actor {
583 flex-direction: column;
584 align-items: flex-start;
592 @include avatar(80px);
599 flex-direction: column;
600 justify-content: center;
607 .actor-display-name {
609 font-weight: $font-bold;
617 color: $grey-actor-name;
630 @include actor-owner;
642 text-transform: uppercase;
646 @media screen and (max-width: $mobile-view) {
653 @mixin create-button {
654 @include peertube-button-link;
655 @include orange-button;
656 @include button-with-icon(20px, 5px, -1px);
662 padding-bottom: 20px;
664 border-bottom: 1px solid #C6C6C6;
666 @media screen and (max-width: 800px) {
667 flex-direction: column;
673 @mixin dropdown-with-icon-item {
686 @mixin progressbar($small: false) {
687 background-color: $grey-background-color;
692 border-radius: 0.25rem;
697 color: $grey-foreground-color;
711 color: pvar(--mainBackgroundColor);
712 background-color: pvar(--mainColor);
714 flex-direction: column;
715 justify-content: center;
718 transition: width 0.6s ease;
721 background-color: pvar(--secondaryColor);
729 padding: 0.75rem 1rem;
732 background-color: pvar(--submenuColor);
733 border-radius: 0.25rem;
739 color: pvar(--mainColor);
742 & + .breadcrumb-item {
743 padding-left: 0.5rem;
745 display: inline-block;
746 padding-right: 0.5rem;
764 box-sizing: border-box;
765 flex: 0 0 percentage(1/3);
770 @include disable-default-a-behaviour;
772 text-decoration: none;
787 background: pvar(--submenuColor);
789 box-sizing: border-box;
794 .dashboard-num, .dashboard-text {
798 color: pvar(--mainForegroundColor);
805 color: pvar(--inputPlaceholderColor);
813 border: none !important;
816 .ng2-tags-container {
819 border: 1px solid #C6C6C6;
821 padding: 5px !important;
825 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
831 height: 30px !important;
832 font-size: 12px !important;
834 background-color: pvar(--mainBackgroundColor) !important;
835 color: pvar(--mainForegroundColor) !important;
840 background-color: $grey-background-color !important;
841 color: #000 !important;
842 border-radius: 3px !important;
843 font-size: 12px !important;
844 height: 30px !important;
845 line-height: 30px !important;
846 margin: 0 5px 0 0 !important;
847 cursor: default !important;
848 padding: 0 8px 0 10px !important;
851 height: 100% !important;
856 cursor: pointer !important;
857 height: auto !important;
858 vertical-align: middle !important;
859 padding-left: 6px !important;
864 height: auto !important;
865 vertical-align: middle !important;
868 fill: pvar(--greyForegroundColor) !important;
873 transform: none !important;
879 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
881 border-top: .05rem solid $color;
891 background: $background;
893 content: attr(data-content);
894 display: inline-block;
897 transform: translateY(-.65rem);
904 --chip-padding: .2rem .4rem;
905 $avatar-height: 1.2rem;
908 border-radius: var(--chip-radius);
909 display: inline-flex;
911 color: pvar(--mainForegroundColor);
912 height: $avatar-height;
917 padding: var(--chip-padding);
918 text-decoration: none;
919 text-overflow: ellipsis;
920 vertical-align: middle;
924 --chip-radius: .2rem;
925 --chip-padding: .2rem .3rem;
931 height: $avatar-height;
932 width: $avatar-height;
935 display: inline-block;
938 vertical-align: middle;
942 $avatar-height: 2rem;
944 height: $avatar-height;
947 height: $avatar-height;
948 width: $avatar-height;
953 flex-direction: column;
954 height: $avatar-height;
957 justify-content: center;
962 @mixin admin-sub-header-responsive ($horizontal-margins) {
963 flex-direction: column;
966 margin-right: 0px !important;
977 width: calc(100vw - #{$horizontal-margins*2});
985 // applies 16:9 ratio to a child element (using $selector) only using
986 // an immediate's parent size. This allows 16:9 ratio without explicit
987 // dimensions, as width/height cannot be computed from each other.
988 @mixin large-screen-ratio ($selector: 'div') {
1003 @mixin sub-menu-h1 {
1006 border-bottom: 2px solid $grey-background-color;
1007 padding-bottom: 15px;
1008 margin-bottom: $sub-menu-margin-bottom;
1012 vertical-align: bottom;