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) {
20 text-overflow: ellipsis;
23 @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) {
25 /* Fallback for non-webkit */
27 max-height: $font-size * $number-of-lines;
28 /* Fallback for non-webkit */
29 font-size: $font-size;
30 line-height: $font-size;
32 text-overflow: ellipsis;
35 @mixin prefix($property, $parameters...) {
36 @each $prefix in -webkit-, -moz-, -ms-, -o-, "" {
37 #{$prefix}#{$property}: $parameters;
41 @mixin peertube-word-wrap {
42 word-break: break-word;
43 word-wrap: break-word;
44 overflow-wrap: break-word;
45 -webkit-hyphens: auto;
51 @mixin apply-svg-color ($color) {
56 circle[fill="#000000"],
57 polygon[fill="#000000"] {
61 path[stroke="#000000"],
63 rect[stroke="#000000"],
64 circle[stroke="#000000"],
65 polygon[stroke="#000000"] {
69 stop[stop-color="#000000"] {
75 @mixin fill-svg-color ($color) {
83 @mixin button-focus-visible-shadow($color) {
85 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px $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-visible-shadow(var(--mainHoverColor));
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 color: $grey-foreground-color;
155 background-color: transparent;
157 &[disabled], &.disabled {
162 @include apply-svg-color(transparent)
167 &, &:active, &:focus {
168 background-color: $grey-background-color;
169 color: $grey-foreground-color;
172 &:hover, &:active, &:focus, &[disabled], &.disabled {
173 color: $grey-foreground-color;
174 background-color: $grey-background-hover-color;
177 &[disabled], &.disabled {
182 @include apply-svg-color($grey-foreground-color)
186 @mixin peertube-button {
188 font-weight: $font-semibold;
190 height: $button-height;
191 line-height: $button-height;
194 padding: 0 17px 0 13px;
198 @mixin peertube-button-link {
199 display: inline-block;
201 @include disable-default-a-behaviour;
202 @include peertube-button;
205 @mixin peertube-button-outline {
206 display: inline-block;
208 @include disable-default-a-behaviour;
209 @include peertube-button;
214 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
218 margin-right: $margin-right;
223 @mixin peertube-button-file ($width) {
226 display: inline-block;
230 @include peertube-button;
231 @include orange-button;
241 filter: alpha(opacity=0);
250 @mixin icon ($size) {
251 display: inline-block;
252 background-repeat: no-repeat;
253 background-size: contain;
256 vertical-align: middle;
260 @mixin select-arrow-down {
262 right: calc(0% + 15px);
267 pointer-events: none;
268 border: 5px solid rgba(0, 0, 0, 0);
269 border-top-color: #000;
274 @mixin peertube-select-container ($width) {
277 border: 1px solid #C6C6C6;
281 background: var(--inputBackgroundColor);
286 background-color: #E5E5E5;
293 @media screen and (max-width: $width) {
298 @include select-arrow-down;
302 padding: 0 35px 0 12px;
303 width: calc(100% + 2px);
308 background: transparent none;
311 height: $button-height;
312 text-overflow: ellipsis;
313 color: var(--mainForegroundColor);
321 text-shadow: 0 0 0 #000;
330 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
331 @mixin peertube-radio-container {
332 input[type="radio"] {
336 font-weight: $font-regular;
345 border: 1px solid #000;
346 display: inline-block;
349 vertical-align: middle;
356 &:checked + label:before {
357 background-color: #000;
358 box-shadow: inset 0 0 0 4px #fff;
361 &:focus + label:before {
368 @mixin peertube-checkbox ($border-width) {
373 box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
381 border: $border-width solid $fg-color;
383 vertical-align: middle;
389 top: calc(2px - #{$border-width});
394 transform: rotate(45deg) scale(0);
395 border-right: 2px solid $bg-color;
396 border-bottom: 2px solid $bg-color;
401 border-color: transparent;
402 background: var(--mainColor);
403 animation: jelly 0.6s ease;
407 transform: rotate(45deg) scale(1);
413 font-weight: $font-regular;
420 &[disabled] + span + span{
427 @mixin avatar ($size) {
436 @mixin chevron ($size, $border-width) {
438 border-width: $border-width $border-width 0 0;
440 display: inline-block;
441 transform: rotate(-45deg);
446 @mixin chevron-right ($size, $border-width) {
447 @include chevron($size, $border-width);
450 transform: rotate(45deg);
453 @mixin chevron-left ($size, $border-width) {
454 @include chevron($size, $border-width);
457 transform: rotate(-135deg);
460 @mixin in-content-small-title {
461 text-transform: uppercase;
462 color: var(--mainColor);
463 font-weight: $font-bold;
467 @mixin settings-big-title {
468 text-transform: uppercase;
469 color: var(--mainColor);
470 font-weight: $font-bold;
476 @include disable-default-a-behaviour;
480 color: var(--mainForegroundColor);
487 @include avatar(18px);
495 @mixin sub-menu-with-actor {
498 flex-direction: column;
499 align-items: flex-start;
507 @include avatar(80px);
514 flex-direction: column;
515 justify-content: center;
522 .actor-display-name {
524 font-weight: $font-bold;
532 color: $grey-actor-name;
545 @include actor-owner;
557 text-transform: uppercase;
561 @media screen and (max-width: $mobile-view) {
568 @mixin create-button {
569 @include peertube-button-link;
570 @include orange-button;
571 @include button-with-icon(20px, 5px, -1px);
577 padding-bottom: 20px;
579 border-bottom: 1px solid #C6C6C6;
581 @media screen and (max-width: 800px) {
582 flex-direction: column;
588 @mixin dropdown-with-icon-item {
602 background-color: $grey-background-color;
607 border-radius: 0.25rem;
610 color: var(--mainBackgroundColor);
611 background-color: var(--mainColor);
613 flex-direction: column;
614 justify-content: center;
617 transition: width 0.6s ease;
620 background-color: var(--secondaryColor);
628 padding: 0.75rem 1rem;
631 background-color: var(--submenuColor);
632 border-radius: 0.25rem;
638 color: var(--mainColor);
641 & + .breadcrumb-item {
642 padding-left: 0.5rem;
644 display: inline-block;
645 padding-right: 0.5rem;
663 box-sizing: border-box;
664 flex: 0 0 percentage(1/3);
669 text-decoration: none;
684 background: var(--submenuColor);
686 box-sizing: border-box;
691 .dashboard-num, .dashboard-text {
695 color: var(--mainForegroundColor);
702 color: var(--inputPlaceholderColor);