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;
229 @include peertube-button;
230 @include orange-button;
240 filter: alpha(opacity=0);
249 @mixin icon ($size) {
250 display: inline-block;
251 background-repeat: no-repeat;
252 background-size: contain;
255 vertical-align: middle;
259 @mixin select-arrow-down {
261 right: calc(0% + 15px);
266 pointer-events: none;
267 border: 5px solid rgba(0, 0, 0, 0);
268 border-top-color: #000;
273 @mixin peertube-select-container ($width) {
276 border: 1px solid #C6C6C6;
280 background: var(--inputBackgroundColor);
285 background-color: #E5E5E5;
292 @media screen and (max-width: $width) {
297 @include select-arrow-down;
301 padding: 0 35px 0 12px;
302 width: calc(100% + 2px);
307 background: transparent none;
310 height: $button-height;
311 text-overflow: ellipsis;
312 color: var(--mainForegroundColor);
320 text-shadow: 0 0 0 #000;
329 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
330 @mixin peertube-radio-container {
331 input[type="radio"] {
335 font-weight: $font-regular;
344 border: 1px solid #000;
345 display: inline-block;
348 vertical-align: middle;
355 &:checked + label:before {
356 background-color: #000;
357 box-shadow: inset 0 0 0 4px #fff;
360 &:focus + label:before {
367 @mixin peertube-checkbox ($border-width) {
372 box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
380 border: $border-width solid $fg-color;
382 vertical-align: middle;
388 top: calc(2px - #{$border-width});
393 transform: rotate(45deg) scale(0);
394 border-right: 2px solid $bg-color;
395 border-bottom: 2px solid $bg-color;
400 border-color: transparent;
401 background: $orange-color;
402 animation: jelly 0.6s ease;
406 transform: rotate(45deg) scale(1);
412 font-weight: $font-regular;
419 &[disabled] + span + span{
426 @mixin avatar ($size) {
435 @mixin chevron ($size, $border-width) {
437 border-width: $border-width $border-width 0 0;
439 display: inline-block;
440 transform: rotate(-45deg);
445 @mixin chevron-right ($size, $border-width) {
446 @include chevron($size, $border-width);
449 transform: rotate(45deg);
452 @mixin chevron-left ($size, $border-width) {
453 @include chevron($size, $border-width);
456 transform: rotate(-135deg);
459 @mixin in-content-small-title {
460 text-transform: uppercase;
461 color: var(--mainColor);
462 font-weight: $font-bold;
467 @include disable-default-a-behaviour;
471 color: var(--mainForegroundColor);
478 @include avatar(18px);
486 @mixin sub-menu-with-actor {
489 flex-direction: column;
490 align-items: flex-start;
498 @include avatar(80px);
505 flex-direction: column;
506 justify-content: center;
513 .actor-display-name {
515 font-weight: $font-bold;
523 color: $grey-actor-name;
536 @include actor-owner;
548 text-transform: uppercase;
552 @media screen and (max-width: $mobile-view) {
559 @mixin create-button {
560 @include peertube-button-link;
561 @include orange-button;
562 @include button-with-icon(20px, 5px, -1px);
568 padding-bottom: 20px;
570 border-bottom: 1px solid #C6C6C6;
572 @media screen and (max-width: 800px) {
573 flex-direction: column;
579 @mixin dropdown-with-icon-item {