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)
154 &, &:active, &:focus {
155 background-color: $grey-background-color;
156 color: $grey-foreground-color;
159 &:hover, &:active, &:focus, &[disabled], &.disabled {
160 color: $grey-foreground-color;
161 background-color: $grey-background-hover-color;
164 &[disabled], &.disabled {
169 @include apply-svg-color($grey-foreground-color)
173 @mixin peertube-button {
175 font-weight: $font-semibold;
177 height: $button-height;
178 line-height: $button-height;
181 padding: 0 17px 0 13px;
185 @mixin peertube-button-link {
186 display: inline-block;
188 @include disable-default-a-behaviour;
189 @include peertube-button;
192 @mixin peertube-button-outline {
193 display: inline-block;
195 @include disable-default-a-behaviour;
196 @include peertube-button;
201 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
205 margin-right: $margin-right;
210 @mixin peertube-button-file ($width) {
213 display: inline-block;
216 @include peertube-button;
217 @include orange-button;
227 filter: alpha(opacity=0);
236 @mixin icon ($size) {
237 display: inline-block;
238 background-repeat: no-repeat;
239 background-size: contain;
242 vertical-align: middle;
246 @mixin select-arrow-down {
248 right: calc(0% + 15px);
253 pointer-events: none;
254 border: 5px solid rgba(0, 0, 0, 0);
255 border-top-color: #000;
260 @mixin peertube-select-container ($width) {
263 border: 1px solid #C6C6C6;
267 background: var(--inputBackgroundColor);
272 background-color: #E5E5E5;
279 @media screen and (max-width: $width) {
284 @include select-arrow-down;
288 padding: 0 35px 0 12px;
289 width: calc(100% + 2px);
294 background: transparent none;
297 height: $button-height;
298 text-overflow: ellipsis;
299 color: var(--mainForegroundColor);
307 text-shadow: 0 0 0 #000;
316 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
317 @mixin peertube-radio-container {
318 input[type="radio"] {
322 font-weight: $font-regular;
331 border: 1px solid #000;
332 display: inline-block;
335 vertical-align: middle;
342 &:checked + label:before {
343 background-color: #000;
344 box-shadow: inset 0 0 0 4px #fff;
347 &:focus + label:before {
354 @mixin peertube-checkbox ($border-width) {
359 box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
367 border: $border-width solid $fg-color;
369 vertical-align: middle;
375 top: calc(2px - #{$border-width});
380 transform: rotate(45deg) scale(0);
381 border-right: 2px solid $bg-color;
382 border-bottom: 2px solid $bg-color;
387 border-color: transparent;
388 background: $orange-color;
389 animation: jelly 0.6s ease;
393 transform: rotate(45deg) scale(1);
399 font-weight: $font-regular;
406 &[disabled] + span + span{
413 @mixin avatar ($size) {
422 @mixin chevron ($size, $border-width) {
424 border-width: $border-width $border-width 0 0;
426 display: inline-block;
427 transform: rotate(-45deg);
432 @mixin chevron-right ($size, $border-width) {
433 @include chevron($size, $border-width);
436 transform: rotate(45deg);
439 @mixin chevron-left ($size, $border-width) {
440 @include chevron($size, $border-width);
443 transform: rotate(-135deg);
446 @mixin in-content-small-title {
447 text-transform: uppercase;
448 color: var(--mainColor);
449 font-weight: $font-bold;
454 @include disable-default-a-behaviour;
458 color: var(--mainForegroundColor);
465 @include avatar(18px);
473 @mixin sub-menu-with-actor {
476 flex-direction: column;
477 align-items: flex-start;
485 @include avatar(80px);
492 flex-direction: column;
493 justify-content: center;
500 .actor-display-name {
502 font-weight: $font-bold;
510 color: $grey-actor-name;
523 @include actor-owner;
535 text-transform: uppercase;
539 @media screen and (max-width: $mobile-view) {
546 @mixin create-button {
547 @include peertube-button-link;
548 @include orange-button;
549 @include button-with-icon(20px, 5px, -1px);
555 padding-bottom: 20px;
557 border-bottom: 1px solid #C6C6C6;
559 @media screen and (max-width: 800px) {
560 flex-direction: column;
566 @mixin dropdown-with-icon-item {