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 -webkit-line-clamp: $number-of-lines;
27 /* Fallback for non-webkit */
28 font-size: $font-size;
29 line-height: $font-size;
31 text-overflow: ellipsis;
32 max-height: $font-size * $number-of-lines;
35 @mixin fade-text ($fade-after, $background-color) {
47 background: linear-gradient(transparent $fade-after, $background-color);
51 @mixin peertube-word-wrap {
52 word-break: break-word;
53 word-wrap: break-word;
54 overflow-wrap: break-word;
58 @mixin apply-svg-color ($color) {
65 @mixin fill-svg-color ($color) {
73 @mixin button-focus($color) {
76 box-shadow: #{$focus-box-shadow-form} $color;
80 @mixin peertube-input-text($width) {
81 display: inline-block;
82 height: $button-height;
84 color: pvar(--inputForegroundColor);
85 background-color: pvar(--inputBackgroundColor);
86 border: 1px solid #C6C6C6;
93 color: pvar(--inputPlaceholderColor);
100 @media screen and (max-width: $width) {
105 @mixin peertube-input-group($width) {
107 min-height: $button-height;
118 @mixin peertube-textarea ($width, $height) {
119 @include peertube-input-text($width);
121 color: pvar(--textareaForegroundColor);
122 background-color: pvar(--textareaBackgroundColor);
128 @mixin orange-button {
129 @include button-focus(pvar(--mainColorLightest));
131 &, &:active, &:focus {
133 background-color: pvar(--mainColor);
138 background-color: pvar(--mainHoverColor);
141 &[disabled], &.disabled {
144 background-color: #C6C6C6;
148 @include apply-svg-color(#fff)
152 @mixin orange-button-inverted {
153 @include button-focus(pvar(--mainColorLightest));
155 border: 2px solid pvar(--mainColor);
156 font-weight: $font-semibold;
158 &, &:active, &:focus {
159 color: pvar(--mainColor);
160 background-color: pvar(--mainBackgroundColor);
164 color: pvar(--mainColor);
165 background-color: pvar(--mainColorLightest);
168 &[disabled], &.disabled {
170 color: pvar(--mainColor);
171 background-color: #C6C6C6;
175 @include apply-svg-color(pvar(--mainColor))
179 @mixin tertiary-button {
180 @include button-focus($grey-button-outline-color);
182 color: pvar(--greyForegroundColor);
183 background-color: transparent;
185 &[disabled], &.disabled {
190 @include apply-svg-color(transparent)
195 @include button-focus($grey-button-outline-color);
197 background-color: $grey-background-color;
198 color: pvar(--greyForegroundColor);
200 &:hover, &:active, &:focus, &[disabled], &.disabled {
201 color: pvar(--greyForegroundColor);
202 background-color: $grey-background-hover-color;
205 &[disabled], &.disabled {
210 @include apply-svg-color(pvar(--greyForegroundColor))
214 @mixin danger-button {
215 $color: lighten($color: #c54130, $amount: 10);
218 @include button-focus(scale-color($color, $alpha: -95%));
219 background-color: $color;
222 &:hover, &:active, &:focus, &[disabled], &.disabled {
223 background-color: lighten($color: $color, $amount: 10);
226 &[disabled], &.disabled {
231 @include apply-svg-color($text)
235 @mixin peertube-button {
237 font-weight: $font-semibold;
239 height: $button-height;
240 line-height: $button-height;
243 padding: 0 17px 0 13px;
247 @mixin peertube-button-link {
248 display: inline-block;
250 @include disable-default-a-behaviour;
251 @include peertube-button;
254 @mixin peertube-button-outline {
255 display: inline-block;
257 @include disable-default-a-behaviour;
258 @include peertube-button;
263 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
264 display: inline-flex;
266 line-height: normal !important;
271 margin-right: $margin-right;
276 @mixin peertube-file {
279 display: inline-block;
290 filter: alpha(opacity=0);
299 @mixin peertube-button-file ($width) {
302 @include peertube-file;
303 @include peertube-button;
306 @mixin icon ($size) {
307 display: inline-block;
308 background-repeat: no-repeat;
309 background-size: contain;
312 vertical-align: middle;
316 @mixin select-arrow-down {
318 right: calc(0% + 15px);
323 pointer-events: none;
324 border: 5px solid rgba(0, 0, 0, 0);
325 border-top-color: #000;
330 @mixin responsive-width ($width) {
333 @media screen and (max-width: $width) {
338 @mixin peertube-select-container ($width) {
343 color: pvar(--inputForegroundColor);
344 background: pvar(--inputBackgroundColor);
349 background-color: #E5E5E5;
356 @media screen and (max-width: $width) {
361 @include select-arrow-down;
365 padding: 0 35px 0 12px;
367 border: 1px solid #C6C6C6;
368 background: transparent none;
371 height: $button-height;
372 text-overflow: ellipsis;
373 color: pvar(--mainForegroundColor);
381 text-shadow: 0 0 0 #000;
389 &.peertube-select-button {
390 @include grey-button;
394 font-weight: $font-semibold;
395 color: pvar(--greyForegroundColor);
401 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
402 @mixin peertube-radio-container {
403 input[type="radio"] {
407 font-weight: $font-regular;
416 border: 1px solid #000;
417 display: inline-block;
420 vertical-align: middle;
427 &:checked + label:before {
428 background-color: #000;
429 box-shadow: inset 0 0 0 4px #fff;
432 &:focus + label:before {
439 @mixin peertube-checkbox ($border-width) {
444 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
452 border: $border-width solid #C6C6C6;
454 vertical-align: middle;
460 top: calc(2px - #{$border-width});
465 transform: rotate(45deg) scale(0);
466 border-right: 2px solid $bg-color;
467 border-bottom: 2px solid $bg-color;
472 border-color: transparent;
473 background: pvar(--mainColor);
474 animation: jelly 0.6s ease;
478 transform: rotate(45deg) scale(1);
484 font-weight: $font-regular;
491 &[disabled] + span + span{
499 padding: 1/4em 1/2em;
500 text-transform: uppercase;
501 font-weight: $font-bold;
503 letter-spacing: 1/3px;
507 background-color: #ffcdd2;
512 text-decoration: line-through;
516 background-color: #feedaf;
521 background-color: #ffd8b2;
526 background-color: #c8e6c9;
531 background-color: #b3e5fc;
536 background-color: #eccfff;
541 @mixin avatar ($size) {
550 @mixin channel-avatar ($size) {
558 @mixin chevron ($size, $border-width) {
560 border-width: $border-width $border-width 0 0;
562 display: inline-block;
563 transform: rotate(-45deg);
568 @mixin chevron-right ($size, $border-width) {
569 @include chevron($size, $border-width);
572 transform: rotate(45deg);
575 @mixin chevron-left ($size, $border-width) {
576 @include chevron($size, $border-width);
579 transform: rotate(-135deg);
582 @mixin in-content-small-title {
583 text-transform: uppercase;
584 color: pvar(--mainColor);
585 font-weight: $font-bold;
589 @mixin settings-big-title {
590 text-transform: uppercase;
591 color: pvar(--mainColor);
592 font-weight: $font-bold;
598 @include disable-default-a-behaviour;
602 color: pvar(--mainForegroundColor);
609 @include avatar(18px);
617 @mixin create-button {
618 @include peertube-button-link;
619 @include orange-button;
620 @include button-with-icon(20px, 5px, -1px);
623 @mixin row-blocks ($column-responsive: true) {
626 padding-bottom: 20px;
628 border-bottom: 1px solid #C6C6C6;
630 @media screen and (max-width: $small-view) {
631 @if $column-responsive {
632 flex-direction: column;
637 padding-bottom: 10px;
643 @mixin dropdown-with-icon-item {
656 @mixin progressbar($small: false) {
657 background-color: $grey-background-color;
662 border-radius: 0.25rem;
667 color: $grey-foreground-color;
681 color: pvar(--mainBackgroundColor);
682 background-color: pvar(--mainColor);
684 flex-direction: column;
685 justify-content: center;
688 transition: width 0.6s ease;
691 background-color: pvar(--secondaryColor);
695 background-color: lighten($color: #c54130, $amount: 10);
703 padding: 0.75rem 1rem;
706 background-color: pvar(--submenuBackgroundColor);
707 border-radius: 0.25rem;
713 color: pvar(--mainColor);
716 & + .breadcrumb-item {
717 padding-left: 0.5rem;
719 display: inline-block;
720 padding-right: 0.5rem;
738 box-sizing: border-box;
739 flex: 0 0 percentage(1/3);
744 @include disable-default-a-behaviour;
746 text-decoration: none;
761 background: pvar(--submenuBackgroundColor);
763 box-sizing: border-box;
768 .dashboard-num, .dashboard-text {
771 color: pvar(--mainForegroundColor);
778 color: pvar(--inputPlaceholderColor);
783 @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) {
785 border-top: .05rem solid $color;
795 background: $background;
797 content: attr(data-content);
798 display: inline-block;
801 transform: translateY(-.65rem);
808 --chip-padding: .2rem .4rem;
809 $avatar-height: 1.2rem;
812 border-radius: var(--chip-radius);
813 display: inline-flex;
815 color: pvar(--mainForegroundColor);
816 height: $avatar-height;
821 padding: var(--chip-padding);
822 text-decoration: none;
823 text-overflow: ellipsis;
824 vertical-align: middle;
828 --chip-radius: .2rem;
829 --chip-padding: .2rem .3rem;
835 height: $avatar-height;
836 width: $avatar-height;
839 display: inline-block;
842 vertical-align: middle;
846 $avatar-height: 2rem;
848 height: $avatar-height;
851 height: $avatar-height;
852 width: $avatar-height;
857 flex-direction: column;
858 height: $avatar-height;
861 justify-content: center;
866 @mixin admin-sub-header-responsive {
867 flex-direction: column;
870 margin-right: 0px !important;
889 // applies 16:9 ratio to a child element (using $selector) only using
890 // an immediate's parent size. This allows 16:9 ratio without explicit
891 // dimensions, as width/height cannot be computed from each other.
892 @mixin large-screen-ratio ($selector: 'div') {
910 border-bottom: 2px solid $grey-background-color;
911 padding-bottom: 15px;
912 margin-bottom: $sub-menu-margin-bottom;
916 vertical-align: bottom;
927 @mixin play-icon ($width, $height) {
934 transform: translate(-50%, -50%) scale(0.5);
936 border-top: ($height / 2) solid transparent;
937 border-bottom: ($height / 2) solid transparent;
939 border-left: $width solid rgba(255, 255, 255, 0.95);
942 @mixin on-small-main-col () {
943 :host-context(.main-col:not(.expanded)) {
944 @media screen and (max-width: $small-view + $menu-width) {
949 :host-context(.main-col.expanded) {
950 @media screen and (max-width: $small-view) {
956 @mixin on-mobile-main-col () {
957 :host-context(.main-col:not(.expanded)) {
958 @media screen and (max-width: $mobile-view + $menu-width) {
963 :host-context(.main-col.expanded) {
964 @media screen and (max-width: $mobile-view) {