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 button-focus-visible-shadow($color) {
77 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px $color;
81 @mixin peertube-input-text($width) {
82 display: inline-block;
83 height: $button-height;
85 background: var(--inputBackgroundColor);
86 border: 1px solid #C6C6C6;
93 color: var(--inputPlaceholderColor);
96 @media screen and (max-width: $width) {
101 @mixin peertube-input-group($width) {
103 min-height: $button-height;
113 @mixin peertube-textarea ($width, $height) {
114 @include peertube-input-text($width);
121 @mixin orange-button {
122 @include button-focus-visible-shadow(var(--mainHoverColor));
124 &, &:active, &:focus {
126 background-color: var(--mainColor);
131 background-color: var(--mainHoverColor);
134 &[disabled], &.disabled {
137 background-color: #C6C6C6;
141 @include apply-svg-color(#fff)
146 &, &:active, &:focus {
147 background-color: $grey-background-color;
148 color: $grey-foreground-color;
151 &:hover, &:active, &:focus, &[disabled], &.disabled {
152 color: $grey-foreground-color;
153 background-color: $grey-background-hover-color;
156 &[disabled], &.disabled {
161 @include apply-svg-color($grey-foreground-color)
165 @mixin peertube-button {
167 font-weight: $font-semibold;
169 height: $button-height;
170 line-height: $button-height;
173 padding: 0 17px 0 13px;
177 @mixin peertube-button-link {
178 display: inline-block;
180 @include disable-default-a-behaviour;
181 @include peertube-button;
184 @mixin peertube-button-outline {
185 display: inline-block;
187 @include disable-default-a-behaviour;
188 @include peertube-button;
193 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
197 margin-right: $margin-right;
202 @mixin peertube-button-file ($width) {
205 display: inline-block;
208 @include peertube-button;
209 @include orange-button;
219 filter: alpha(opacity=0);
228 @mixin icon ($size) {
229 display: inline-block;
230 background-repeat: no-repeat;
231 background-size: contain;
234 vertical-align: middle;
238 @mixin select-arrow-down {
240 right: calc(0% + 15px);
245 pointer-events: none;
246 border: 5px solid rgba(0, 0, 0, 0);
247 border-top-color: #000;
252 @mixin peertube-select-container ($width) {
255 border: 1px solid #C6C6C6;
259 background: var(--inputBackgroundColor);
264 background-color: #E5E5E5;
271 @media screen and (max-width: $width) {
276 @include select-arrow-down;
280 padding: 0 35px 0 12px;
281 width: calc(100% + 2px);
286 background: transparent none;
289 height: $button-height;
290 text-overflow: ellipsis;
291 color: var(--mainForegroundColor);
299 text-shadow: 0 0 0 #000;
308 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
309 @mixin peertube-radio-container {
310 input[type="radio"] {
314 font-weight: $font-regular;
323 border: 1px solid #000;
324 display: inline-block;
327 vertical-align: middle;
334 &:checked + label:before {
335 background-color: #000;
336 box-shadow: inset 0 0 0 4px #fff;
339 &:focus + label:before {
346 @mixin peertube-checkbox ($border-width) {
351 box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
359 border: $border-width solid $fg-color;
361 vertical-align: middle;
367 top: calc(2px - #{$border-width});
372 transform: rotate(45deg) scale(0);
373 border-right: 2px solid $bg-color;
374 border-bottom: 2px solid $bg-color;
379 border-color: transparent;
380 background: $orange-color;
381 animation: jelly 0.6s ease;
385 transform: rotate(45deg) scale(1);
391 font-weight: $font-regular;
398 &[disabled] + span + span{
405 @mixin avatar ($size) {
414 @mixin chevron ($size, $border-width) {
416 border-width: $border-width $border-width 0 0;
418 display: inline-block;
419 transform: rotate(-45deg);
424 @mixin chevron-right ($size, $border-width) {
425 @include chevron($size, $border-width);
428 transform: rotate(45deg);
431 @mixin chevron-left ($size, $border-width) {
432 @include chevron($size, $border-width);
435 transform: rotate(-135deg);
438 @mixin in-content-small-title {
439 text-transform: uppercase;
440 color: var(--mainColor);
441 font-weight: $font-bold;
446 @include disable-default-a-behaviour;
450 color: var(--mainForegroundColor);
457 @include avatar(18px);
465 @mixin sub-menu-with-actor {
468 flex-direction: column;
469 align-items: flex-start;
477 @include avatar(80px);
484 flex-direction: column;
485 justify-content: center;
492 .actor-display-name {
494 font-weight: $font-bold;
502 color: $grey-actor-name;
515 @include actor-owner;
527 text-transform: uppercase;
531 @media screen and (max-width: $mobile-view) {
538 @mixin create-button {
539 @include peertube-button-link;
540 @include orange-button;
541 @include button-with-icon(20px, 5px, -1px);
547 padding-bottom: 20px;
549 border-bottom: 1px solid #C6C6C6;
551 @media screen and (max-width: 800px) {
552 flex-direction: column;
558 @mixin dropdown-with-icon-item {