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);
179 &, &:active, &:focus {
180 background-color: $grey-background-color;
181 color: pvar(--greyForegroundColor);
184 &:hover, &:active, &:focus, &[disabled], &.disabled {
185 color: pvar(--greyForegroundColor);
186 background-color: $grey-background-hover-color;
189 &[disabled], &.disabled {
194 @include apply-svg-color(pvar(--greyForegroundColor))
198 @mixin peertube-button {
200 font-weight: $font-semibold;
202 height: $button-height;
203 line-height: $button-height;
206 padding: 0 17px 0 13px;
210 @mixin peertube-button-link {
211 display: inline-block;
213 @include disable-default-a-behaviour;
214 @include peertube-button;
217 @mixin peertube-button-outline {
218 display: inline-block;
220 @include disable-default-a-behaviour;
221 @include peertube-button;
226 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
230 margin-right: $margin-right;
235 @mixin peertube-button-file ($width) {
238 display: inline-block;
242 @include peertube-button;
243 @include orange-button;
253 filter: alpha(opacity=0);
262 @mixin icon ($size) {
263 display: inline-block;
264 background-repeat: no-repeat;
265 background-size: contain;
268 vertical-align: middle;
272 @mixin select-arrow-down {
274 right: calc(0% + 15px);
279 pointer-events: none;
280 border: 5px solid rgba(0, 0, 0, 0);
281 border-top-color: #000;
286 @mixin peertube-select-container ($width) {
291 color: pvar(--inputForegroundColor);
292 background: pvar(--inputBackgroundColor);
297 background-color: #E5E5E5;
304 @media screen and (max-width: $width) {
309 @include select-arrow-down;
313 padding: 0 35px 0 12px;
314 width: calc(100% + 2px);
317 border: 1px solid #C6C6C6;
318 background: transparent none;
321 height: $button-height;
322 text-overflow: ellipsis;
323 color: pvar(--mainForegroundColor);
331 text-shadow: 0 0 0 #000;
340 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
341 @mixin peertube-radio-container {
342 input[type="radio"] {
346 font-weight: $font-regular;
355 border: 1px solid #000;
356 display: inline-block;
359 vertical-align: middle;
366 &:checked + label:before {
367 background-color: #000;
368 box-shadow: inset 0 0 0 4px #fff;
371 &:focus + label:before {
378 @mixin peertube-checkbox ($border-width) {
383 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
391 border: $border-width solid #C6C6C6;
393 vertical-align: middle;
399 top: calc(2px - #{$border-width});
404 transform: rotate(45deg) scale(0);
405 border-right: 2px solid $bg-color;
406 border-bottom: 2px solid $bg-color;
411 border-color: transparent;
412 background: pvar(--mainColor);
413 animation: jelly 0.6s ease;
417 transform: rotate(45deg) scale(1);
423 font-weight: $font-regular;
430 &[disabled] + span + span{
437 @mixin avatar ($size) {
446 @mixin chevron ($size, $border-width) {
448 border-width: $border-width $border-width 0 0;
450 display: inline-block;
451 transform: rotate(-45deg);
456 @mixin chevron-right ($size, $border-width) {
457 @include chevron($size, $border-width);
460 transform: rotate(45deg);
463 @mixin chevron-left ($size, $border-width) {
464 @include chevron($size, $border-width);
467 transform: rotate(-135deg);
470 @mixin in-content-small-title {
471 text-transform: uppercase;
472 color: pvar(--mainColor);
473 font-weight: $font-bold;
477 @mixin settings-big-title {
478 text-transform: uppercase;
479 color: pvar(--mainColor);
480 font-weight: $font-bold;
486 @include disable-default-a-behaviour;
490 color: pvar(--mainForegroundColor);
497 @include avatar(18px);
505 @mixin sub-menu-with-actor {
508 flex-direction: column;
509 align-items: flex-start;
517 @include avatar(80px);
524 flex-direction: column;
525 justify-content: center;
532 .actor-display-name {
534 font-weight: $font-bold;
542 color: $grey-actor-name;
555 @include actor-owner;
567 text-transform: uppercase;
571 @media screen and (max-width: $mobile-view) {
578 @mixin create-button {
579 @include peertube-button-link;
580 @include orange-button;
581 @include button-with-icon(20px, 5px, -1px);
587 padding-bottom: 20px;
589 border-bottom: 1px solid #C6C6C6;
591 @media screen and (max-width: 800px) {
592 flex-direction: column;
598 @mixin dropdown-with-icon-item {
612 background-color: $grey-background-color;
617 border-radius: 0.25rem;
620 color: pvar(--mainBackgroundColor);
621 background-color: pvar(--mainColor);
623 flex-direction: column;
624 justify-content: center;
627 transition: width 0.6s ease;
630 background-color: pvar(--secondaryColor);
638 padding: 0.75rem 1rem;
641 background-color: pvar(--submenuColor);
642 border-radius: 0.25rem;
648 color: pvar(--mainColor);
651 & + .breadcrumb-item {
652 padding-left: 0.5rem;
654 display: inline-block;
655 padding-right: 0.5rem;
673 box-sizing: border-box;
674 flex: 0 0 percentage(1/3);
679 @include disable-default-a-behaviour;
681 text-decoration: none;
696 background: pvar(--submenuColor);
698 box-sizing: border-box;
703 .dashboard-num, .dashboard-text {
707 color: pvar(--mainForegroundColor);
714 color: pvar(--inputPlaceholderColor);
722 border: none !important;
725 .ng2-tags-container {
728 border: 1px solid #C6C6C6;
730 padding: 5px !important;
734 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
740 height: 30px !important;
741 font-size: 12px !important;
743 background-color: pvar(--mainBackgroundColor) !important;
744 color: pvar(--mainForegroundColor) !important;
749 background-color: $grey-background-color !important;
750 color: #000 !important;
751 border-radius: 3px !important;
752 font-size: 12px !important;
753 height: 30px !important;
754 line-height: 30px !important;
755 margin: 0 5px 0 0 !important;
756 cursor: default !important;
757 padding: 0 8px 0 10px !important;
760 height: 100% !important;
765 cursor: pointer !important;
766 height: auto !important;
767 vertical-align: middle !important;
768 padding-left: 6px !important;
773 height: auto !important;
774 vertical-align: middle !important;
777 fill: pvar(--greyForegroundColor) !important;
782 transform: none !important;
788 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
790 border-top: .05rem solid $color;
800 background: $background;
802 content: attr(data-content);
803 display: inline-block;
806 transform: translateY(-.65rem);
813 --chip-padding: .2rem .4rem;
814 $avatar-height: 1.2rem;
817 border-radius: var(--chip-radius);
818 display: inline-flex;
820 color: pvar(--mainForegroundColor);
821 height: $avatar-height;
826 padding: var(--chip-padding);
827 text-decoration: none;
828 text-overflow: ellipsis;
829 vertical-align: middle;
833 --chip-radius: .2rem;
834 --chip-padding: .2rem .3rem;
840 height: $avatar-height;
841 width: $avatar-height;
844 display: inline-block;
847 vertical-align: middle;
851 $avatar-height: 2rem;
853 height: $avatar-height;
856 height: $avatar-height;
857 width: $avatar-height;
862 flex-direction: column;
863 height: $avatar-height;
866 justify-content: center;
871 @mixin admin-sub-header-responsive ($horizontal-margins) {
872 flex-direction: column;
875 margin-right: 0px !important;
886 width: calc(100vw - #{$horizontal-margins*2});
894 // applies 16:9 ratio to a child element (using $selector) only using
895 // an immediate's parent size. This allows 16:9 ratio without explicit
896 // dimensions, as width/height cannot be computed from each other.
897 @mixin large-screen-ratio ($selector: 'div') {