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;
335 width: calc(100% + 2px);
338 border: 1px solid #C6C6C6;
339 background: transparent none;
342 height: $button-height;
343 text-overflow: ellipsis;
344 color: pvar(--mainForegroundColor);
352 text-shadow: 0 0 0 #000;
361 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
362 @mixin peertube-radio-container {
363 input[type="radio"] {
367 font-weight: $font-regular;
376 border: 1px solid #000;
377 display: inline-block;
380 vertical-align: middle;
387 &:checked + label:before {
388 background-color: #000;
389 box-shadow: inset 0 0 0 4px #fff;
392 &:focus + label:before {
399 @mixin peertube-checkbox ($border-width) {
404 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
412 border: $border-width solid #C6C6C6;
414 vertical-align: middle;
420 top: calc(2px - #{$border-width});
425 transform: rotate(45deg) scale(0);
426 border-right: 2px solid $bg-color;
427 border-bottom: 2px solid $bg-color;
432 border-color: transparent;
433 background: pvar(--mainColor);
434 animation: jelly 0.6s ease;
438 transform: rotate(45deg) scale(1);
444 font-weight: $font-regular;
451 &[disabled] + span + span{
458 @mixin avatar ($size) {
467 @mixin chevron ($size, $border-width) {
469 border-width: $border-width $border-width 0 0;
471 display: inline-block;
472 transform: rotate(-45deg);
477 @mixin chevron-right ($size, $border-width) {
478 @include chevron($size, $border-width);
481 transform: rotate(45deg);
484 @mixin chevron-left ($size, $border-width) {
485 @include chevron($size, $border-width);
488 transform: rotate(-135deg);
491 @mixin in-content-small-title {
492 text-transform: uppercase;
493 color: pvar(--mainColor);
494 font-weight: $font-bold;
498 @mixin settings-big-title {
499 text-transform: uppercase;
500 color: pvar(--mainColor);
501 font-weight: $font-bold;
507 @include disable-default-a-behaviour;
511 color: pvar(--mainForegroundColor);
518 @include avatar(18px);
526 @mixin sub-menu-with-actor {
529 flex-direction: column;
530 align-items: flex-start;
538 @include avatar(80px);
545 flex-direction: column;
546 justify-content: center;
553 .actor-display-name {
555 font-weight: $font-bold;
563 color: $grey-actor-name;
576 @include actor-owner;
588 text-transform: uppercase;
592 @media screen and (max-width: $mobile-view) {
599 @mixin create-button {
600 @include peertube-button-link;
601 @include orange-button;
602 @include button-with-icon(20px, 5px, -1px);
608 padding-bottom: 20px;
610 border-bottom: 1px solid #C6C6C6;
612 @media screen and (max-width: 800px) {
613 flex-direction: column;
619 @mixin dropdown-with-icon-item {
633 background-color: $grey-background-color;
638 border-radius: 0.25rem;
641 color: pvar(--mainBackgroundColor);
642 background-color: pvar(--mainColor);
644 flex-direction: column;
645 justify-content: center;
648 transition: width 0.6s ease;
651 background-color: pvar(--secondaryColor);
659 padding: 0.75rem 1rem;
662 background-color: pvar(--submenuColor);
663 border-radius: 0.25rem;
669 color: pvar(--mainColor);
672 & + .breadcrumb-item {
673 padding-left: 0.5rem;
675 display: inline-block;
676 padding-right: 0.5rem;
694 box-sizing: border-box;
695 flex: 0 0 percentage(1/3);
700 @include disable-default-a-behaviour;
702 text-decoration: none;
717 background: pvar(--submenuColor);
719 box-sizing: border-box;
724 .dashboard-num, .dashboard-text {
728 color: pvar(--mainForegroundColor);
735 color: pvar(--inputPlaceholderColor);
743 border: none !important;
746 .ng2-tags-container {
749 border: 1px solid #C6C6C6;
751 padding: 5px !important;
755 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
761 height: 30px !important;
762 font-size: 12px !important;
764 background-color: pvar(--mainBackgroundColor) !important;
765 color: pvar(--mainForegroundColor) !important;
770 background-color: $grey-background-color !important;
771 color: #000 !important;
772 border-radius: 3px !important;
773 font-size: 12px !important;
774 height: 30px !important;
775 line-height: 30px !important;
776 margin: 0 5px 0 0 !important;
777 cursor: default !important;
778 padding: 0 8px 0 10px !important;
781 height: 100% !important;
786 cursor: pointer !important;
787 height: auto !important;
788 vertical-align: middle !important;
789 padding-left: 6px !important;
794 height: auto !important;
795 vertical-align: middle !important;
798 fill: pvar(--greyForegroundColor) !important;
803 transform: none !important;
809 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
811 border-top: .05rem solid $color;
821 background: $background;
823 content: attr(data-content);
824 display: inline-block;
827 transform: translateY(-.65rem);
834 --chip-padding: .2rem .4rem;
835 $avatar-height: 1.2rem;
838 border-radius: var(--chip-radius);
839 display: inline-flex;
841 color: pvar(--mainForegroundColor);
842 height: $avatar-height;
847 padding: var(--chip-padding);
848 text-decoration: none;
849 text-overflow: ellipsis;
850 vertical-align: middle;
854 --chip-radius: .2rem;
855 --chip-padding: .2rem .3rem;
861 height: $avatar-height;
862 width: $avatar-height;
865 display: inline-block;
868 vertical-align: middle;
872 $avatar-height: 2rem;
874 height: $avatar-height;
877 height: $avatar-height;
878 width: $avatar-height;
883 flex-direction: column;
884 height: $avatar-height;
887 justify-content: center;
892 @mixin admin-sub-header-responsive ($horizontal-margins) {
893 flex-direction: column;
896 margin-right: 0px !important;
907 width: calc(100vw - #{$horizontal-margins*2});
915 // applies 16:9 ratio to a child element (using $selector) only using
916 // an immediate's parent size. This allows 16:9 ratio without explicit
917 // dimensions, as width/height cannot be computed from each other.
918 @mixin large-screen-ratio ($selector: 'div') {