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 {
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 peertube-input-text($width) {
81 display: inline-block;
82 height: $button-height;
84 background: var(--inputColor);
85 border: 1px solid #C6C6C6;
92 color: var(--inputPlaceholderColor);
95 @media screen and (max-width: $width) {
100 @mixin peertube-input-group($width) {
102 height: $button-height;
112 @mixin peertube-textarea ($width, $height) {
113 @include peertube-input-text($width);
120 @mixin orange-button {
121 &, &:active, &:focus {
123 background-color: var(--mainColor);
128 background-color: var(--mainHoverColor);
131 &[disabled], &.disabled {
134 background-color: #C6C6C6;
138 @include apply-svg-color(#fff)
143 &, &:active, &:focus {
144 background-color: $grey-background-color;
145 color: $grey-foreground-color;
148 &:hover, &:active, &:focus, &[disabled], &.disabled {
149 color: $grey-foreground-color;
150 background-color: $grey-background-hover-color;
153 &[disabled], &.disabled {
158 @include apply-svg-color($grey-foreground-color)
162 @mixin peertube-button {
164 font-weight: $font-semibold;
166 height: $button-height;
167 line-height: $button-height;
170 padding: 0 17px 0 13px;
175 @mixin peertube-button-link {
176 display: inline-block;
178 @include disable-default-a-behaviour;
179 @include peertube-button;
182 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
186 margin-right: $margin-right;
191 @mixin peertube-button-file ($width) {
194 display: inline-block;
197 @include peertube-button;
198 @include orange-button;
208 filter: alpha(opacity=0);
217 @mixin icon ($size) {
218 display: inline-block;
219 background-repeat: no-repeat;
220 background-size: contain;
223 vertical-align: middle;
227 @mixin peertube-select-container ($width) {
230 border: 1px solid #C6C6C6;
234 background: var(--inputColor);
238 @media screen and (max-width: $width) {
244 right: calc(0% + 15px);
249 pointer-events: none;
250 border: 5px solid rgba(0, 0, 0, 0);
251 border-top-color: #000;
257 padding: 0 35px 0 12px;
258 width: calc(100% + 2px);
263 background: transparent none;
266 height: $button-height;
267 text-overflow: ellipsis;
268 color: var(--mainForegroundColor);
276 text-shadow: 0 0 0 #000;
285 @mixin peertube-select-disabled-container ($width) {
286 @include peertube-select-container($width);
288 background-color: #E5E5E5;
295 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
296 @mixin peertube-radio-container {
297 input[type="radio"] {
301 font-weight: $font-regular;
310 border: 1px solid #000;
311 display: inline-block;
314 vertical-align: middle;
321 &:checked + label:before {
322 background-color: #000;
323 box-shadow: inset 0 0 0 4px #fff;
326 &:focus + label:before {
333 @mixin peertube-checkbox ($border-width) {
340 border: $border-width solid var(--mainForegroundColor);
342 vertical-align: middle;
348 top: calc(2px - #{$border-width});
353 transform: rotate(45deg) scale(0);
354 border-right: 2px solid var(--mainBackgroundColor);
355 border-bottom: 2px solid var(--mainBackgroundColor);
360 border-color: transparent;
361 background: var(--mainColor);
362 animation: jelly 0.6s ease;
366 transform: rotate(45deg) scale(1);
372 font-weight: $font-regular;
379 &[disabled] + span + span{
386 @mixin avatar ($size) {
393 @mixin chevron ($size, $border-width) {
395 border-width: $border-width $border-width 0 0;
397 display: inline-block;
398 transform: rotate(-45deg);
403 @mixin chevron-right ($size, $border-width) {
404 @include chevron($size, $border-width);
407 transform: rotate(45deg);
410 @mixin chevron-left ($size, $border-width) {
411 @include chevron($size, $border-width);
414 transform: rotate(-135deg);
417 @mixin in-content-small-title {
418 text-transform: uppercase;
419 color: var(--mainColor);
420 font-weight: $font-bold;
425 @include disable-default-a-behaviour;
427 display: inline-table;
430 color: var(--mainForegroundColor);
437 @include avatar(18px);
445 @mixin sub-menu-with-actor {
448 flex-direction: column;
449 align-items: flex-start;
457 @include avatar(80px);
464 flex-direction: column;
465 justify-content: center;
471 .actor-display-name {
473 font-weight: $font-bold;
481 color: $grey-actor-name;
490 @include actor-owner;
506 @mixin create-button {
507 @include peertube-button-link;
508 @include orange-button;
509 @include button-with-icon(20px, 5px, -1px);
515 padding-bottom: 20px;
517 border-bottom: 1px solid #C6C6C6;
519 @media screen and (max-width: 800px) {
520 flex-direction: column;
526 @mixin dropdown-with-icon-item {