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;
32 /* Let space at right for dots */
37 /* Display dots if the max number of lines is exceeded */
40 /* set position to right bottom corner of block */
46 /* Hide dots if the max number of lines is not exceeded */
49 background-color: var(--mainBackgroundColor);
50 /* set position to right bottom corner of text */
59 @mixin prefix($property, $parameters...) {
60 @each $prefix in -webkit-, -moz-, -ms-, -o-, "" {
61 #{$prefix}#{$property}: $parameters;
65 @mixin peertube-word-wrap {
66 word-break: break-word;
67 word-wrap: break-word;
68 overflow-wrap: break-word;
69 -webkit-hyphens: auto;
75 @mixin apply-svg-color ($color) {
80 circle[fill="#000000"],
81 polygon[fill="#000000"] {
85 path[stroke="#000000"],
87 rect[stroke="#000000"],
88 circle[stroke="#000000"],
89 polygon[stroke="#000000"] {
93 stop[stop-color="#000000"] {
99 @mixin fill-svg-color ($color) {
107 @mixin button-focus($color) {
110 box-shadow: #{$focus-box-shadow-form} $color;
114 @mixin peertube-input-text($width) {
115 display: inline-block;
116 height: $button-height;
118 background: var(--inputBackgroundColor);
119 border: 1px solid #C6C6C6;
126 color: var(--inputPlaceholderColor);
129 @media screen and (max-width: $width) {
134 @mixin peertube-input-group($width) {
136 min-height: $button-height;
146 @mixin peertube-textarea ($width, $height) {
147 @include peertube-input-text($width);
154 @mixin orange-button {
155 @include button-focus(var(--mainColorLightest));
157 &, &:active, &:focus {
159 background-color: var(--mainColor);
164 background-color: var(--mainHoverColor);
167 &[disabled], &.disabled {
170 background-color: #C6C6C6;
174 @include apply-svg-color(#fff)
178 @mixin tertiary-button {
179 @include button-focus($grey-button-outline-color);
181 color: $grey-foreground-color;
182 background-color: transparent;
184 &[disabled], &.disabled {
189 @include apply-svg-color(transparent)
194 @include button-focus($grey-button-outline-color);
196 &, &:active, &:focus {
197 background-color: $grey-background-color;
198 color: $grey-foreground-color;
201 &:hover, &:active, &:focus, &[disabled], &.disabled {
202 color: $grey-foreground-color;
203 background-color: $grey-background-hover-color;
206 &[disabled], &.disabled {
211 @include apply-svg-color($grey-foreground-color)
215 @mixin peertube-button {
217 font-weight: $font-semibold;
219 height: $button-height;
220 line-height: $button-height;
223 padding: 0 17px 0 13px;
227 @mixin peertube-button-link {
228 display: inline-block;
230 @include disable-default-a-behaviour;
231 @include peertube-button;
234 @mixin peertube-button-outline {
235 display: inline-block;
237 @include disable-default-a-behaviour;
238 @include peertube-button;
243 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
247 margin-right: $margin-right;
252 @mixin peertube-button-file ($width) {
255 display: inline-block;
259 @include peertube-button;
260 @include orange-button;
270 filter: alpha(opacity=0);
279 @mixin icon ($size) {
280 display: inline-block;
281 background-repeat: no-repeat;
282 background-size: contain;
285 vertical-align: middle;
289 @mixin select-arrow-down {
291 right: calc(0% + 15px);
296 pointer-events: none;
297 border: 5px solid rgba(0, 0, 0, 0);
298 border-top-color: #000;
303 @mixin peertube-select-container ($width) {
308 background: var(--inputBackgroundColor);
313 background-color: #E5E5E5;
320 @media screen and (max-width: $width) {
325 @include select-arrow-down;
329 padding: 0 35px 0 12px;
330 width: calc(100% + 2px);
333 border: 1px solid #C6C6C6;
334 background: transparent none;
337 height: $button-height;
338 text-overflow: ellipsis;
339 color: var(--mainForegroundColor);
347 text-shadow: 0 0 0 #000;
356 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
357 @mixin peertube-radio-container {
358 input[type="radio"] {
362 font-weight: $font-regular;
371 border: 1px solid #000;
372 display: inline-block;
375 vertical-align: middle;
382 &:checked + label:before {
383 background-color: #000;
384 box-shadow: inset 0 0 0 4px #fff;
387 &:focus + label:before {
394 @mixin peertube-checkbox ($border-width) {
399 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
407 border: $border-width solid #C6C6C6;
409 vertical-align: middle;
415 top: calc(2px - #{$border-width});
420 transform: rotate(45deg) scale(0);
421 border-right: 2px solid $bg-color;
422 border-bottom: 2px solid $bg-color;
427 border-color: transparent;
428 background: var(--mainColor);
429 animation: jelly 0.6s ease;
433 transform: rotate(45deg) scale(1);
439 font-weight: $font-regular;
446 &[disabled] + span + span{
453 @mixin avatar ($size) {
462 @mixin chevron ($size, $border-width) {
464 border-width: $border-width $border-width 0 0;
466 display: inline-block;
467 transform: rotate(-45deg);
472 @mixin chevron-right ($size, $border-width) {
473 @include chevron($size, $border-width);
476 transform: rotate(45deg);
479 @mixin chevron-left ($size, $border-width) {
480 @include chevron($size, $border-width);
483 transform: rotate(-135deg);
486 @mixin in-content-small-title {
487 text-transform: uppercase;
488 color: var(--mainColor);
489 font-weight: $font-bold;
493 @mixin settings-big-title {
494 text-transform: uppercase;
495 color: var(--mainColor);
496 font-weight: $font-bold;
502 @include disable-default-a-behaviour;
506 color: var(--mainForegroundColor);
513 @include avatar(18px);
521 @mixin sub-menu-with-actor {
524 flex-direction: column;
525 align-items: flex-start;
533 @include avatar(80px);
540 flex-direction: column;
541 justify-content: center;
548 .actor-display-name {
550 font-weight: $font-bold;
558 color: $grey-actor-name;
571 @include actor-owner;
583 text-transform: uppercase;
587 @media screen and (max-width: $mobile-view) {
594 @mixin create-button {
595 @include peertube-button-link;
596 @include orange-button;
597 @include button-with-icon(20px, 5px, -1px);
603 padding-bottom: 20px;
605 border-bottom: 1px solid #C6C6C6;
607 @media screen and (max-width: 800px) {
608 flex-direction: column;
614 @mixin dropdown-with-icon-item {
628 background-color: $grey-background-color;
633 border-radius: 0.25rem;
636 color: var(--mainBackgroundColor);
637 background-color: var(--mainColor);
639 flex-direction: column;
640 justify-content: center;
643 transition: width 0.6s ease;
646 background-color: var(--secondaryColor);
654 padding: 0.75rem 1rem;
657 background-color: var(--submenuColor);
658 border-radius: 0.25rem;
664 color: var(--mainColor);
667 & + .breadcrumb-item {
668 padding-left: 0.5rem;
670 display: inline-block;
671 padding-right: 0.5rem;
689 box-sizing: border-box;
690 flex: 0 0 percentage(1/3);
695 text-decoration: none;
710 background: var(--submenuColor);
712 box-sizing: border-box;
717 .dashboard-num, .dashboard-text {
721 color: var(--mainForegroundColor);
728 color: var(--inputPlaceholderColor);
736 border: none !important;
739 .ng2-tags-container {
742 border: 1px solid #C6C6C6;
744 padding: 5px !important;
748 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
754 height: 30px !important;
755 font-size: 12px !important;
757 background-color: var(--mainBackgroundColor) !important;
758 color: var(--mainForegroundColor) !important;
763 background-color: $grey-background-color !important;
764 color: #000 !important;
765 border-radius: 3px !important;
766 font-size: 12px !important;
767 height: 30px !important;
768 line-height: 30px !important;
769 margin: 0 5px 0 0 !important;
770 cursor: default !important;
771 padding: 0 8px 0 10px !important;
774 height: 100% !important;
779 cursor: pointer !important;
780 height: auto !important;
781 vertical-align: middle !important;
782 padding-left: 6px !important;
787 height: auto !important;
788 vertical-align: middle !important;
791 fill: $grey-foreground-color !important;
796 transform: none !important;
802 @mixin divider($color: var(--submenuColor), $background: var(--mainBackgroundColor)) {
804 border-top: .05rem solid $color;
814 background: $background;
816 content: attr(data-content);
817 display: inline-block;
820 transform: translateY(-.65rem);
826 $avatar-height: 1.2rem;
830 display: inline-flex;
832 color: var(--mainForegroundColor);
833 height: $avatar-height;
838 padding: .2rem .4rem;
839 text-decoration: none;
840 text-overflow: ellipsis;
841 vertical-align: middle;
847 height: $avatar-height;
848 width: $avatar-height;
851 display: inline-block;
854 vertical-align: middle;
858 $avatar-height: 1.8rem;
860 height: $avatar-height;
863 height: $avatar-height;
864 width: $avatar-height;
869 flex-direction: column;
871 height: $avatar-height;
874 justify-content: center;