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;
47 @mixin apply-svg-color ($color) {
54 @mixin fill-svg-color ($color) {
62 @mixin button-focus($color) {
65 box-shadow: #{$focus-box-shadow-form} $color;
69 @mixin peertube-input-text($width) {
70 display: inline-block;
71 height: $button-height;
73 color: pvar(--inputForegroundColor);
74 background-color: pvar(--inputBackgroundColor);
75 border: 1px solid #C6C6C6;
82 color: pvar(--inputPlaceholderColor);
89 @media screen and (max-width: $width) {
94 @mixin peertube-input-group($width) {
96 min-height: $button-height;
107 @mixin peertube-textarea ($width, $height) {
108 @include peertube-input-text($width);
110 color: pvar(--textareaForegroundColor);
111 background-color: pvar(--textareaBackgroundColor);
117 @mixin orange-button {
118 @include button-focus(pvar(--mainColorLightest));
120 &, &:active, &:focus {
122 background-color: pvar(--mainColor);
127 background-color: pvar(--mainHoverColor);
130 &[disabled], &.disabled {
133 background-color: #C6C6C6;
137 @include apply-svg-color(#fff)
141 @mixin tertiary-button {
142 @include button-focus($grey-button-outline-color);
144 color: pvar(--greyForegroundColor);
145 background-color: transparent;
147 &[disabled], &.disabled {
152 @include apply-svg-color(transparent)
157 @include button-focus($grey-button-outline-color);
159 background-color: $grey-background-color;
160 color: pvar(--greyForegroundColor);
162 &:hover, &:active, &:focus, &[disabled], &.disabled {
163 color: pvar(--greyForegroundColor);
164 background-color: $grey-background-hover-color;
167 &[disabled], &.disabled {
172 @include apply-svg-color(pvar(--greyForegroundColor))
176 @mixin danger-button {
177 $color: lighten($color: #c54130, $amount: 10);
180 @include button-focus(scale-color($color, $alpha: -95%));
181 background-color: $color;
184 &:hover, &:active, &:focus, &[disabled], &.disabled {
185 background-color: lighten($color: $color, $amount: 10);
188 &[disabled], &.disabled {
193 @include apply-svg-color($text)
197 @mixin peertube-button {
199 font-weight: $font-semibold;
201 height: $button-height;
202 line-height: $button-height;
205 padding: 0 17px 0 13px;
209 @mixin peertube-button-link {
210 display: inline-block;
212 @include disable-default-a-behaviour;
213 @include peertube-button;
216 @mixin peertube-button-outline {
217 display: inline-block;
219 @include disable-default-a-behaviour;
220 @include peertube-button;
225 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
226 display: inline-flex;
228 line-height: normal !important;
233 margin-right: $margin-right;
238 @mixin peertube-file {
241 display: inline-block;
252 filter: alpha(opacity=0);
261 @mixin peertube-button-file ($width) {
264 @include peertube-file;
265 @include peertube-button;
268 @mixin icon ($size) {
269 display: inline-block;
270 background-repeat: no-repeat;
271 background-size: contain;
274 vertical-align: middle;
278 @mixin select-arrow-down {
280 right: calc(0% + 15px);
285 pointer-events: none;
286 border: 5px solid rgba(0, 0, 0, 0);
287 border-top-color: #000;
292 @mixin responsive-width ($width) {
295 @media screen and (max-width: $width) {
300 @mixin peertube-select-container ($width) {
305 color: pvar(--inputForegroundColor);
306 background: pvar(--inputBackgroundColor);
311 background-color: #E5E5E5;
318 @media screen and (max-width: $width) {
323 @include select-arrow-down;
327 padding: 0 35px 0 12px;
329 border: 1px solid #C6C6C6;
330 background: transparent none;
333 height: $button-height;
334 text-overflow: ellipsis;
335 color: pvar(--mainForegroundColor);
343 text-shadow: 0 0 0 #000;
351 &.peertube-select-button {
352 @include grey-button;
356 font-weight: $font-semibold;
357 color: pvar(--greyForegroundColor);
363 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
364 @mixin peertube-radio-container {
365 input[type="radio"] {
369 font-weight: $font-regular;
378 border: 1px solid #000;
379 display: inline-block;
382 vertical-align: middle;
389 &:checked + label:before {
390 background-color: #000;
391 box-shadow: inset 0 0 0 4px #fff;
394 &:focus + label:before {
401 @mixin peertube-checkbox ($border-width) {
406 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
414 border: $border-width solid #C6C6C6;
416 vertical-align: middle;
422 top: calc(2px - #{$border-width});
427 transform: rotate(45deg) scale(0);
428 border-right: 2px solid $bg-color;
429 border-bottom: 2px solid $bg-color;
434 border-color: transparent;
435 background: pvar(--mainColor);
436 animation: jelly 0.6s ease;
440 transform: rotate(45deg) scale(1);
446 font-weight: $font-regular;
453 &[disabled] + span + span{
461 padding: 1/4em 1/2em;
462 text-transform: uppercase;
463 font-weight: $font-bold;
465 letter-spacing: 1/3px;
469 background-color: #ffcdd2;
474 text-decoration: line-through;
478 background-color: #feedaf;
483 background-color: #ffd8b2;
488 background-color: #c8e6c9;
493 background-color: #b3e5fc;
498 background-color: #eccfff;
503 @mixin avatar ($size) {
512 @mixin chevron ($size, $border-width) {
514 border-width: $border-width $border-width 0 0;
516 display: inline-block;
517 transform: rotate(-45deg);
522 @mixin chevron-right ($size, $border-width) {
523 @include chevron($size, $border-width);
526 transform: rotate(45deg);
529 @mixin chevron-left ($size, $border-width) {
530 @include chevron($size, $border-width);
533 transform: rotate(-135deg);
536 @mixin in-content-small-title {
537 text-transform: uppercase;
538 color: pvar(--mainColor);
539 font-weight: $font-bold;
543 @mixin settings-big-title {
544 text-transform: uppercase;
545 color: pvar(--mainColor);
546 font-weight: $font-bold;
552 @include disable-default-a-behaviour;
556 color: pvar(--mainForegroundColor);
563 @include avatar(18px);
571 @mixin sub-menu-with-actor {
576 flex-direction: column;
577 align-items: flex-start;
585 @include avatar(80px);
592 flex-direction: column;
593 justify-content: center;
600 .actor-display-name {
602 font-weight: $font-bold;
610 color: $grey-actor-name;
623 @include actor-owner;
635 text-transform: uppercase;
639 @media screen and (max-width: $mobile-view) {
645 display: inline-block;
651 @mixin create-button {
652 @include peertube-button-link;
653 @include orange-button;
654 @include button-with-icon(20px, 5px, -1px);
660 padding-bottom: 20px;
662 border-bottom: 1px solid #C6C6C6;
664 @media screen and (max-width: 800px) {
665 flex-direction: column;
671 @mixin dropdown-with-icon-item {
684 @mixin progressbar($small: false) {
685 background-color: $grey-background-color;
690 border-radius: 0.25rem;
695 color: $grey-foreground-color;
709 color: pvar(--mainBackgroundColor);
710 background-color: pvar(--mainColor);
712 flex-direction: column;
713 justify-content: center;
716 transition: width 0.6s ease;
719 background-color: pvar(--secondaryColor);
723 background-color: lighten($color: #c54130, $amount: 10);
731 padding: 0.75rem 1rem;
734 background-color: pvar(--submenuColor);
735 border-radius: 0.25rem;
741 color: pvar(--mainColor);
744 & + .breadcrumb-item {
745 padding-left: 0.5rem;
747 display: inline-block;
748 padding-right: 0.5rem;
766 box-sizing: border-box;
767 flex: 0 0 percentage(1/3);
772 @include disable-default-a-behaviour;
774 text-decoration: none;
789 background: pvar(--submenuColor);
791 box-sizing: border-box;
796 .dashboard-num, .dashboard-text {
799 color: pvar(--mainForegroundColor);
806 color: pvar(--inputPlaceholderColor);
811 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
813 border-top: .05rem solid $color;
823 background: $background;
825 content: attr(data-content);
826 display: inline-block;
829 transform: translateY(-.65rem);
836 --chip-padding: .2rem .4rem;
837 $avatar-height: 1.2rem;
840 border-radius: var(--chip-radius);
841 display: inline-flex;
843 color: pvar(--mainForegroundColor);
844 height: $avatar-height;
849 padding: var(--chip-padding);
850 text-decoration: none;
851 text-overflow: ellipsis;
852 vertical-align: middle;
856 --chip-radius: .2rem;
857 --chip-padding: .2rem .3rem;
863 height: $avatar-height;
864 width: $avatar-height;
867 display: inline-block;
870 vertical-align: middle;
874 $avatar-height: 2rem;
876 height: $avatar-height;
879 height: $avatar-height;
880 width: $avatar-height;
885 flex-direction: column;
886 height: $avatar-height;
889 justify-content: center;
894 @mixin admin-sub-header-responsive ($horizontal-margins) {
895 flex-direction: column;
898 margin-right: 0px !important;
909 width: calc(100vw - #{$horizontal-margins*2});
917 // applies 16:9 ratio to a child element (using $selector) only using
918 // an immediate's parent size. This allows 16:9 ratio without explicit
919 // dimensions, as width/height cannot be computed from each other.
920 @mixin large-screen-ratio ($selector: 'div') {
938 border-bottom: 2px solid $grey-background-color;
939 padding-bottom: 15px;
940 margin-bottom: $sub-menu-margin-bottom;
944 vertical-align: bottom;
955 @mixin play-icon ($width, $height) {
962 transform: translate(-50%, -50%) scale(0.5);
964 border-top: ($height / 2) solid transparent;
965 border-bottom: ($height / 2) solid transparent;
967 border-left: $width solid rgba(255, 255, 255, 0.95);