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) {
55 circle[fill="#000000"],
56 polygon[fill="#000000"] {
60 path[stroke="#000000"],
62 rect[stroke="#000000"],
63 circle[stroke="#000000"],
64 polygon[stroke="#000000"] {
68 stop[stop-color="#000000"] {
74 @mixin fill-svg-color ($color) {
82 @mixin button-focus($color) {
85 box-shadow: #{$focus-box-shadow-form} $color;
89 @mixin peertube-input-text($width) {
90 display: inline-block;
91 height: $button-height;
93 background: var(--inputBackgroundColor);
94 border: 1px solid #C6C6C6;
101 color: var(--inputPlaceholderColor);
104 @media screen and (max-width: $width) {
109 @mixin peertube-input-group($width) {
111 min-height: $button-height;
121 @mixin peertube-textarea ($width, $height) {
122 @include peertube-input-text($width);
129 @mixin orange-button {
130 @include button-focus(var(--mainColorLightest));
132 &, &:active, &:focus {
134 background-color: var(--mainColor);
139 background-color: var(--mainHoverColor);
142 &[disabled], &.disabled {
145 background-color: #C6C6C6;
149 @include apply-svg-color(#fff)
153 @mixin tertiary-button {
154 @include button-focus($grey-button-outline-color);
156 color: $grey-foreground-color;
157 background-color: transparent;
159 &[disabled], &.disabled {
164 @include apply-svg-color(transparent)
169 @include button-focus($grey-button-outline-color);
171 &, &:active, &:focus {
172 background-color: $grey-background-color;
173 color: $grey-foreground-color;
176 &:hover, &:active, &:focus, &[disabled], &.disabled {
177 color: $grey-foreground-color;
178 background-color: $grey-background-hover-color;
181 &[disabled], &.disabled {
186 @include apply-svg-color($grey-foreground-color)
190 @mixin peertube-button {
192 font-weight: $font-semibold;
194 height: $button-height;
195 line-height: $button-height;
198 padding: 0 17px 0 13px;
202 @mixin peertube-button-link {
203 display: inline-block;
205 @include disable-default-a-behaviour;
206 @include peertube-button;
209 @mixin peertube-button-outline {
210 display: inline-block;
212 @include disable-default-a-behaviour;
213 @include peertube-button;
218 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
222 margin-right: $margin-right;
227 @mixin peertube-button-file ($width) {
230 display: inline-block;
234 @include peertube-button;
235 @include orange-button;
245 filter: alpha(opacity=0);
254 @mixin icon ($size) {
255 display: inline-block;
256 background-repeat: no-repeat;
257 background-size: contain;
260 vertical-align: middle;
264 @mixin select-arrow-down {
266 right: calc(0% + 15px);
271 pointer-events: none;
272 border: 5px solid rgba(0, 0, 0, 0);
273 border-top-color: #000;
278 @mixin peertube-select-container ($width) {
283 background: var(--inputBackgroundColor);
288 background-color: #E5E5E5;
295 @media screen and (max-width: $width) {
300 @include select-arrow-down;
304 padding: 0 35px 0 12px;
305 width: calc(100% + 2px);
308 border: 1px solid #C6C6C6;
309 background: transparent none;
312 height: $button-height;
313 text-overflow: ellipsis;
314 color: var(--mainForegroundColor);
322 text-shadow: 0 0 0 #000;
331 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
332 @mixin peertube-radio-container {
333 input[type="radio"] {
337 font-weight: $font-regular;
346 border: 1px solid #000;
347 display: inline-block;
350 vertical-align: middle;
357 &:checked + label:before {
358 background-color: #000;
359 box-shadow: inset 0 0 0 4px #fff;
362 &:focus + label:before {
369 @mixin peertube-checkbox ($border-width) {
374 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
382 border: $border-width solid #C6C6C6;
384 vertical-align: middle;
390 top: calc(2px - #{$border-width});
395 transform: rotate(45deg) scale(0);
396 border-right: 2px solid $bg-color;
397 border-bottom: 2px solid $bg-color;
402 border-color: transparent;
403 background: var(--mainColor);
404 animation: jelly 0.6s ease;
408 transform: rotate(45deg) scale(1);
414 font-weight: $font-regular;
421 &[disabled] + span + span{
428 @mixin avatar ($size) {
437 @mixin chevron ($size, $border-width) {
439 border-width: $border-width $border-width 0 0;
441 display: inline-block;
442 transform: rotate(-45deg);
447 @mixin chevron-right ($size, $border-width) {
448 @include chevron($size, $border-width);
451 transform: rotate(45deg);
454 @mixin chevron-left ($size, $border-width) {
455 @include chevron($size, $border-width);
458 transform: rotate(-135deg);
461 @mixin in-content-small-title {
462 text-transform: uppercase;
463 color: var(--mainColor);
464 font-weight: $font-bold;
468 @mixin settings-big-title {
469 text-transform: uppercase;
470 color: var(--mainColor);
471 font-weight: $font-bold;
477 @include disable-default-a-behaviour;
481 color: var(--mainForegroundColor);
488 @include avatar(18px);
496 @mixin sub-menu-with-actor {
499 flex-direction: column;
500 align-items: flex-start;
508 @include avatar(80px);
515 flex-direction: column;
516 justify-content: center;
523 .actor-display-name {
525 font-weight: $font-bold;
533 color: $grey-actor-name;
546 @include actor-owner;
558 text-transform: uppercase;
562 @media screen and (max-width: $mobile-view) {
569 @mixin create-button {
570 @include peertube-button-link;
571 @include orange-button;
572 @include button-with-icon(20px, 5px, -1px);
578 padding-bottom: 20px;
580 border-bottom: 1px solid #C6C6C6;
582 @media screen and (max-width: 800px) {
583 flex-direction: column;
589 @mixin dropdown-with-icon-item {
603 background-color: $grey-background-color;
608 border-radius: 0.25rem;
611 color: var(--mainBackgroundColor);
612 background-color: var(--mainColor);
614 flex-direction: column;
615 justify-content: center;
618 transition: width 0.6s ease;
621 background-color: var(--secondaryColor);
629 padding: 0.75rem 1rem;
632 background-color: var(--submenuColor);
633 border-radius: 0.25rem;
639 color: var(--mainColor);
642 & + .breadcrumb-item {
643 padding-left: 0.5rem;
645 display: inline-block;
646 padding-right: 0.5rem;
664 box-sizing: border-box;
665 flex: 0 0 percentage(1/3);
670 text-decoration: none;
685 background: var(--submenuColor);
687 box-sizing: border-box;
692 .dashboard-num, .dashboard-text {
696 color: var(--mainForegroundColor);
703 color: var(--inputPlaceholderColor);
711 border: none !important;
714 .ng2-tags-container {
717 border: 1px solid #C6C6C6;
719 padding: 5px !important;
723 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
729 height: 30px !important;
730 font-size: 12px !important;
732 background-color: var(--mainBackgroundColor) !important;
733 color: var(--mainForegroundColor) !important;
738 background-color: $grey-background-color !important;
739 color: #000 !important;
740 border-radius: 3px !important;
741 font-size: 12px !important;
742 height: 30px !important;
743 line-height: 30px !important;
744 margin: 0 5px 0 0 !important;
745 cursor: default !important;
746 padding: 0 8px 0 10px !important;
749 height: 100% !important;
754 cursor: pointer !important;
755 height: auto !important;
756 vertical-align: middle !important;
757 padding-left: 6px !important;
762 height: auto !important;
763 vertical-align: middle !important;
766 fill: $grey-foreground-color !important;
771 transform: none !important;
777 @mixin divider($color: var(--submenuColor), $background: var(--mainBackgroundColor)) {
779 border-top: .05rem solid $color;
789 background: $background;
791 content: attr(data-content);
792 display: inline-block;
795 transform: translateY(-.65rem);
801 $avatar-height: 1.2rem;
805 display: inline-flex;
807 color: var(--mainForegroundColor);
808 height: $avatar-height;
813 padding: .2rem .4rem;
814 text-decoration: none;
815 text-overflow: ellipsis;
816 vertical-align: middle;
822 height: $avatar-height;
823 width: $avatar-height;
826 display: inline-block;
829 vertical-align: middle;
833 $avatar-height: 1.8rem;
835 height: $avatar-height;
838 height: $avatar-height;
839 width: $avatar-height;
844 flex-direction: column;
846 height: $avatar-height;
849 justify-content: center;