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);
110 @media screen and (max-width: $width) {
115 @mixin peertube-input-group($width) {
117 min-height: $button-height;
127 @mixin peertube-textarea ($width, $height) {
128 @include peertube-input-text($width);
130 color: pvar(--textareaForegroundColor);
131 background-color: pvar(--textareaBackgroundColor);
137 @mixin orange-button {
138 @include button-focus(pvar(--mainColorLightest));
140 &, &:active, &:focus {
142 background-color: pvar(--mainColor);
147 background-color: pvar(--mainHoverColor);
150 &[disabled], &.disabled {
153 background-color: #C6C6C6;
157 @include apply-svg-color(#fff)
161 @mixin tertiary-button {
162 @include button-focus($grey-button-outline-color);
164 color: pvar(--greyForegroundColor);
165 background-color: transparent;
167 &[disabled], &.disabled {
172 @include apply-svg-color(transparent)
177 @include button-focus($grey-button-outline-color);
178 background-color: $grey-background-color;
179 color: pvar(--greyForegroundColor);
181 &:hover, &:active, &:focus, &[disabled], &.disabled {
182 color: pvar(--greyForegroundColor);
183 background-color: $grey-background-hover-color;
186 &[disabled], &.disabled {
191 @include apply-svg-color(pvar(--greyForegroundColor))
195 @mixin danger-button {
196 $color: lighten($color: #c54130, $amount: 10);
199 @include button-focus(scale-color($color, $alpha: -95%));
200 background-color: $color;
203 &:hover, &:active, &:focus, &[disabled], &.disabled {
204 background-color: lighten($color: $color, $amount: 10);
207 &[disabled], &.disabled {
212 @include apply-svg-color($text)
216 @mixin peertube-button {
218 font-weight: $font-semibold;
220 height: $button-height;
221 line-height: $button-height;
224 padding: 0 17px 0 13px;
228 @mixin peertube-button-link {
229 display: inline-block;
231 @include disable-default-a-behaviour;
232 @include peertube-button;
235 @mixin peertube-button-outline {
236 display: inline-block;
238 @include disable-default-a-behaviour;
239 @include peertube-button;
244 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
248 margin-right: $margin-right;
253 @mixin peertube-button-file ($width) {
256 display: inline-block;
260 @include peertube-button;
270 filter: alpha(opacity=0);
279 @mixin icon ($size) {
280 display: inline-block;
281 background-repeat: no-repeat;
282 background-size: contain;
285 vertical-align: middle;
289 @mixin select-arrow-down {
291 right: calc(0% + 15px);
296 pointer-events: none;
297 border: 5px solid rgba(0, 0, 0, 0);
298 border-top-color: #000;
303 @mixin peertube-select-container ($width) {
308 color: pvar(--inputForegroundColor);
309 background: pvar(--inputBackgroundColor);
314 background-color: #E5E5E5;
321 @media screen and (max-width: $width) {
326 @include select-arrow-down;
330 padding: 0 35px 0 12px;
331 width: calc(100% + 2px);
334 border: 1px solid #C6C6C6;
335 background: transparent none;
338 height: $button-height;
339 text-overflow: ellipsis;
340 color: pvar(--mainForegroundColor);
348 text-shadow: 0 0 0 #000;
357 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
358 @mixin peertube-radio-container {
359 input[type="radio"] {
363 font-weight: $font-regular;
372 border: 1px solid #000;
373 display: inline-block;
376 vertical-align: middle;
383 &:checked + label:before {
384 background-color: #000;
385 box-shadow: inset 0 0 0 4px #fff;
388 &:focus + label:before {
395 @mixin peertube-checkbox ($border-width) {
400 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
408 border: $border-width solid #C6C6C6;
410 vertical-align: middle;
416 top: calc(2px - #{$border-width});
421 transform: rotate(45deg) scale(0);
422 border-right: 2px solid $bg-color;
423 border-bottom: 2px solid $bg-color;
428 border-color: transparent;
429 background: pvar(--mainColor);
430 animation: jelly 0.6s ease;
434 transform: rotate(45deg) scale(1);
440 font-weight: $font-regular;
447 &[disabled] + span + span{
454 @mixin avatar ($size) {
463 @mixin chevron ($size, $border-width) {
465 border-width: $border-width $border-width 0 0;
467 display: inline-block;
468 transform: rotate(-45deg);
473 @mixin chevron-right ($size, $border-width) {
474 @include chevron($size, $border-width);
477 transform: rotate(45deg);
480 @mixin chevron-left ($size, $border-width) {
481 @include chevron($size, $border-width);
484 transform: rotate(-135deg);
487 @mixin in-content-small-title {
488 text-transform: uppercase;
489 color: pvar(--mainColor);
490 font-weight: $font-bold;
494 @mixin settings-big-title {
495 text-transform: uppercase;
496 color: pvar(--mainColor);
497 font-weight: $font-bold;
503 @include disable-default-a-behaviour;
507 color: pvar(--mainForegroundColor);
514 @include avatar(18px);
522 @mixin sub-menu-with-actor {
525 flex-direction: column;
526 align-items: flex-start;
534 @include avatar(80px);
541 flex-direction: column;
542 justify-content: center;
549 .actor-display-name {
551 font-weight: $font-bold;
559 color: $grey-actor-name;
572 @include actor-owner;
584 text-transform: uppercase;
588 @media screen and (max-width: $mobile-view) {
595 @mixin create-button {
596 @include peertube-button-link;
597 @include orange-button;
598 @include button-with-icon(20px, 5px, -1px);
604 padding-bottom: 20px;
606 border-bottom: 1px solid #C6C6C6;
608 @media screen and (max-width: 800px) {
609 flex-direction: column;
615 @mixin dropdown-with-icon-item {
629 background-color: $grey-background-color;
634 border-radius: 0.25rem;
637 color: pvar(--mainBackgroundColor);
638 background-color: pvar(--mainColor);
640 flex-direction: column;
641 justify-content: center;
644 transition: width 0.6s ease;
647 background-color: pvar(--secondaryColor);
655 padding: 0.75rem 1rem;
658 background-color: pvar(--submenuColor);
659 border-radius: 0.25rem;
665 color: pvar(--mainColor);
668 & + .breadcrumb-item {
669 padding-left: 0.5rem;
671 display: inline-block;
672 padding-right: 0.5rem;
690 box-sizing: border-box;
691 flex: 0 0 percentage(1/3);
696 @include disable-default-a-behaviour;
698 text-decoration: none;
713 background: pvar(--submenuColor);
715 box-sizing: border-box;
720 .dashboard-num, .dashboard-text {
724 color: pvar(--mainForegroundColor);
731 color: pvar(--inputPlaceholderColor);
739 border: none !important;
742 .ng2-tags-container {
745 border: 1px solid #C6C6C6;
747 padding: 5px !important;
751 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
757 height: 30px !important;
758 font-size: 12px !important;
760 background-color: pvar(--mainBackgroundColor) !important;
761 color: pvar(--mainForegroundColor) !important;
766 background-color: $grey-background-color !important;
767 color: #000 !important;
768 border-radius: 3px !important;
769 font-size: 12px !important;
770 height: 30px !important;
771 line-height: 30px !important;
772 margin: 0 5px 0 0 !important;
773 cursor: default !important;
774 padding: 0 8px 0 10px !important;
777 height: 100% !important;
782 cursor: pointer !important;
783 height: auto !important;
784 vertical-align: middle !important;
785 padding-left: 6px !important;
790 height: auto !important;
791 vertical-align: middle !important;
794 fill: pvar(--greyForegroundColor) !important;
799 transform: none !important;
805 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
807 border-top: .05rem solid $color;
817 background: $background;
819 content: attr(data-content);
820 display: inline-block;
823 transform: translateY(-.65rem);
830 --chip-padding: .2rem .4rem;
831 $avatar-height: 1.2rem;
834 border-radius: var(--chip-radius);
835 display: inline-flex;
837 color: pvar(--mainForegroundColor);
838 height: $avatar-height;
843 padding: var(--chip-padding);
844 text-decoration: none;
845 text-overflow: ellipsis;
846 vertical-align: middle;
850 --chip-radius: .2rem;
851 --chip-padding: .2rem .3rem;
857 height: $avatar-height;
858 width: $avatar-height;
861 display: inline-block;
864 vertical-align: middle;
868 $avatar-height: 2rem;
870 height: $avatar-height;
873 height: $avatar-height;
874 width: $avatar-height;
879 flex-direction: column;
880 height: $avatar-height;
883 justify-content: center;
888 @mixin admin-sub-header-responsive ($horizontal-margins) {
889 flex-direction: column;
892 margin-right: 0px !important;
903 width: calc(100vw - #{$horizontal-margins*2});
911 // applies 16:9 ratio to a child element (using $selector) only using
912 // an immediate's parent size. This allows 16:9 ratio without explicit
913 // dimensions, as width/height cannot be computed from each other.
914 @mixin large-screen-ratio ($selector: 'div') {