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) {
25 text-overflow: ellipsis;
28 @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) {
30 /* Fallback for non-webkit */
32 max-height: $font-size * $number-of-lines;
33 /* Fallback for non-webkit */
34 font-size: $font-size;
35 line-height: $font-size;
37 text-overflow: ellipsis;
40 @mixin prefix($property, $parameters...) {
41 @each $prefix in -webkit-, -moz-, -ms-, -o-, "" {
42 #{$prefix}#{$property}: $parameters;
46 @mixin peertube-word-wrap {
47 word-break: break-word;
48 word-wrap: break-word;
49 overflow-wrap: break-word;
50 -webkit-hyphens: auto;
56 @mixin apply-svg-color ($color) {
61 circle[fill="#000000"],
62 polygon[fill="#000000"] {
66 path[stroke="#000000"],
68 rect[stroke="#000000"],
69 circle[stroke="#000000"],
70 polygon[stroke="#000000"] {
74 stop[stop-color="#000000"] {
80 @mixin button-focus-visible-shadow($color) {
82 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px $color;
86 @mixin peertube-input-text($width) {
87 display: inline-block;
88 height: $button-height;
90 background: var(--inputBackgroundColor);
91 border: 1px solid #C6C6C6;
98 color: var(--inputPlaceholderColor);
101 @media screen and (max-width: $width) {
106 @mixin peertube-input-group($width) {
108 min-height: $button-height;
118 @mixin peertube-textarea ($width, $height) {
119 @include peertube-input-text($width);
126 @mixin orange-button {
127 @include button-focus-visible-shadow(var(--mainHoverColor));
129 &, &:active, &:focus {
131 background-color: var(--mainColor);
136 background-color: var(--mainHoverColor);
139 &[disabled], &.disabled {
142 background-color: #C6C6C6;
146 @include apply-svg-color(#fff)
151 &, &:active, &:focus {
152 background-color: $grey-background-color;
153 color: $grey-foreground-color;
156 &:hover, &:active, &:focus, &[disabled], &.disabled {
157 color: $grey-foreground-color;
158 background-color: $grey-background-hover-color;
161 &[disabled], &.disabled {
166 @include apply-svg-color($grey-foreground-color)
170 @mixin peertube-button {
172 font-weight: $font-semibold;
174 height: $button-height;
175 line-height: $button-height;
178 padding: 0 17px 0 13px;
182 @mixin peertube-button-link {
183 display: inline-block;
185 @include disable-default-a-behaviour;
186 @include peertube-button;
189 @mixin peertube-button-outline {
190 display: inline-block;
192 @include disable-default-a-behaviour;
193 @include peertube-button;
198 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
202 margin-right: $margin-right;
207 @mixin peertube-button-file ($width) {
210 display: inline-block;
213 @include peertube-button;
214 @include orange-button;
224 filter: alpha(opacity=0);
233 @mixin icon ($size) {
234 display: inline-block;
235 background-repeat: no-repeat;
236 background-size: contain;
239 vertical-align: middle;
243 @mixin select-arrow-down {
245 right: calc(0% + 15px);
250 pointer-events: none;
251 border: 5px solid rgba(0, 0, 0, 0);
252 border-top-color: #000;
257 @mixin peertube-select-container ($width) {
260 border: 1px solid #C6C6C6;
264 background: var(--inputBackgroundColor);
269 background-color: #E5E5E5;
276 @media screen and (max-width: $width) {
281 @include select-arrow-down;
285 padding: 0 35px 0 12px;
286 width: calc(100% + 2px);
291 background: transparent none;
294 height: $button-height;
295 text-overflow: ellipsis;
296 color: var(--mainForegroundColor);
304 text-shadow: 0 0 0 #000;
313 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
314 @mixin peertube-radio-container {
315 input[type="radio"] {
319 font-weight: $font-regular;
328 border: 1px solid #000;
329 display: inline-block;
332 vertical-align: middle;
339 &:checked + label:before {
340 background-color: #000;
341 box-shadow: inset 0 0 0 4px #fff;
344 &:focus + label:before {
351 @mixin peertube-checkbox ($border-width) {
356 box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
364 border: $border-width solid $fg-color;
366 vertical-align: middle;
372 top: calc(2px - #{$border-width});
377 transform: rotate(45deg) scale(0);
378 border-right: 2px solid $bg-color;
379 border-bottom: 2px solid $bg-color;
384 border-color: transparent;
385 background: $orange-color;
386 animation: jelly 0.6s ease;
390 transform: rotate(45deg) scale(1);
396 font-weight: $font-regular;
403 &[disabled] + span + span{
410 @mixin avatar ($size) {
419 @mixin chevron ($size, $border-width) {
421 border-width: $border-width $border-width 0 0;
423 display: inline-block;
424 transform: rotate(-45deg);
429 @mixin chevron-right ($size, $border-width) {
430 @include chevron($size, $border-width);
433 transform: rotate(45deg);
436 @mixin chevron-left ($size, $border-width) {
437 @include chevron($size, $border-width);
440 transform: rotate(-135deg);
443 @mixin in-content-small-title {
444 text-transform: uppercase;
445 color: var(--mainColor);
446 font-weight: $font-bold;
451 @include disable-default-a-behaviour;
453 display: inline-table;
456 color: var(--mainForegroundColor);
463 @include avatar(18px);
471 @mixin sub-menu-with-actor {
474 flex-direction: column;
475 align-items: flex-start;
483 @include avatar(80px);
490 flex-direction: column;
491 justify-content: center;
497 .actor-display-name {
499 font-weight: $font-bold;
507 color: $grey-actor-name;
516 @include actor-owner;
528 text-transform: uppercase;
534 @mixin create-button {
535 @include peertube-button-link;
536 @include orange-button;
537 @include button-with-icon(20px, 5px, -1px);
543 padding-bottom: 20px;
545 border-bottom: 1px solid #C6C6C6;
547 @media screen and (max-width: 800px) {
548 flex-direction: column;
554 @mixin dropdown-with-icon-item {