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;
336 border: 1px solid #C6C6C6;
337 background: transparent none;
340 height: $button-height;
341 text-overflow: ellipsis;
342 color: pvar(--mainForegroundColor);
350 text-shadow: 0 0 0 #000;
358 &.peertube-select-button {
359 @include grey-button;
363 font-weight: $font-semibold;
364 color: pvar(--greyForegroundColor);
370 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
371 @mixin peertube-radio-container {
372 input[type="radio"] {
376 font-weight: $font-regular;
385 border: 1px solid #000;
386 display: inline-block;
389 vertical-align: middle;
396 &:checked + label:before {
397 background-color: #000;
398 box-shadow: inset 0 0 0 4px #fff;
401 &:focus + label:before {
408 @mixin peertube-checkbox ($border-width) {
413 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
421 border: $border-width solid #C6C6C6;
423 vertical-align: middle;
429 top: calc(2px - #{$border-width});
434 transform: rotate(45deg) scale(0);
435 border-right: 2px solid $bg-color;
436 border-bottom: 2px solid $bg-color;
441 border-color: transparent;
442 background: pvar(--mainColor);
443 animation: jelly 0.6s ease;
447 transform: rotate(45deg) scale(1);
453 font-weight: $font-regular;
460 &[disabled] + span + span{
468 padding: 1/4em 1/2em;
469 text-transform: uppercase;
470 font-weight: $font-bold;
472 letter-spacing: 1/3px;
476 background-color: #ffcdd2;
481 text-decoration: line-through;
485 background-color: #feedaf;
490 background-color: #ffd8b2;
495 background-color: #c8e6c9;
500 background-color: #b3e5fc;
505 background-color: #eccfff;
510 @mixin avatar ($size) {
519 @mixin chevron ($size, $border-width) {
521 border-width: $border-width $border-width 0 0;
523 display: inline-block;
524 transform: rotate(-45deg);
529 @mixin chevron-right ($size, $border-width) {
530 @include chevron($size, $border-width);
533 transform: rotate(45deg);
536 @mixin chevron-left ($size, $border-width) {
537 @include chevron($size, $border-width);
540 transform: rotate(-135deg);
543 @mixin in-content-small-title {
544 text-transform: uppercase;
545 color: pvar(--mainColor);
546 font-weight: $font-bold;
550 @mixin settings-big-title {
551 text-transform: uppercase;
552 color: pvar(--mainColor);
553 font-weight: $font-bold;
559 @include disable-default-a-behaviour;
563 color: pvar(--mainForegroundColor);
570 @include avatar(18px);
578 @mixin sub-menu-with-actor {
583 flex-direction: column;
584 align-items: flex-start;
592 @include avatar(80px);
599 flex-direction: column;
600 justify-content: center;
607 .actor-display-name {
609 font-weight: $font-bold;
617 color: $grey-actor-name;
630 @include actor-owner;
642 text-transform: uppercase;
646 @media screen and (max-width: $mobile-view) {
653 @mixin create-button {
654 @include peertube-button-link;
655 @include orange-button;
656 @include button-with-icon(20px, 5px, -1px);
662 padding-bottom: 20px;
664 border-bottom: 1px solid #C6C6C6;
666 @media screen and (max-width: 800px) {
667 flex-direction: column;
673 @mixin dropdown-with-icon-item {
687 background-color: $grey-background-color;
692 border-radius: 0.25rem;
698 color: rgb(92, 92, 92);
710 color: pvar(--mainBackgroundColor);
711 background-color: pvar(--mainColor);
713 flex-direction: column;
714 justify-content: center;
717 transition: width 0.6s ease;
720 background-color: pvar(--secondaryColor);
728 padding: 0.75rem 1rem;
731 background-color: pvar(--submenuColor);
732 border-radius: 0.25rem;
738 color: pvar(--mainColor);
741 & + .breadcrumb-item {
742 padding-left: 0.5rem;
744 display: inline-block;
745 padding-right: 0.5rem;
763 box-sizing: border-box;
764 flex: 0 0 percentage(1/3);
769 @include disable-default-a-behaviour;
771 text-decoration: none;
786 background: pvar(--submenuColor);
788 box-sizing: border-box;
793 .dashboard-num, .dashboard-text {
797 color: pvar(--mainForegroundColor);
804 color: pvar(--inputPlaceholderColor);
812 border: none !important;
815 .ng2-tags-container {
818 border: 1px solid #C6C6C6;
820 padding: 5px !important;
824 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
830 height: 30px !important;
831 font-size: 12px !important;
833 background-color: pvar(--mainBackgroundColor) !important;
834 color: pvar(--mainForegroundColor) !important;
839 background-color: $grey-background-color !important;
840 color: #000 !important;
841 border-radius: 3px !important;
842 font-size: 12px !important;
843 height: 30px !important;
844 line-height: 30px !important;
845 margin: 0 5px 0 0 !important;
846 cursor: default !important;
847 padding: 0 8px 0 10px !important;
850 height: 100% !important;
855 cursor: pointer !important;
856 height: auto !important;
857 vertical-align: middle !important;
858 padding-left: 6px !important;
863 height: auto !important;
864 vertical-align: middle !important;
867 fill: pvar(--greyForegroundColor) !important;
872 transform: none !important;
878 @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) {
880 border-top: .05rem solid $color;
890 background: $background;
892 content: attr(data-content);
893 display: inline-block;
896 transform: translateY(-.65rem);
903 --chip-padding: .2rem .4rem;
904 $avatar-height: 1.2rem;
907 border-radius: var(--chip-radius);
908 display: inline-flex;
910 color: pvar(--mainForegroundColor);
911 height: $avatar-height;
916 padding: var(--chip-padding);
917 text-decoration: none;
918 text-overflow: ellipsis;
919 vertical-align: middle;
923 --chip-radius: .2rem;
924 --chip-padding: .2rem .3rem;
930 height: $avatar-height;
931 width: $avatar-height;
934 display: inline-block;
937 vertical-align: middle;
941 $avatar-height: 2rem;
943 height: $avatar-height;
946 height: $avatar-height;
947 width: $avatar-height;
952 flex-direction: column;
953 height: $avatar-height;
956 justify-content: center;
961 @mixin admin-sub-header-responsive ($horizontal-margins) {
962 flex-direction: column;
965 margin-right: 0px !important;
976 width: calc(100vw - #{$horizontal-margins*2});
984 // applies 16:9 ratio to a child element (using $selector) only using
985 // an immediate's parent size. This allows 16:9 ratio without explicit
986 // dimensions, as width/height cannot be computed from each other.
987 @mixin large-screen-ratio ($selector: 'div') {
1002 @mixin sub-menu-h1 {
1005 border-bottom: 2px solid $grey-background-color;
1006 padding-bottom: 15px;
1007 margin-bottom: $sub-menu-margin-bottom;
1011 vertical-align: bottom;