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) {
338 outline: 1px solid #1e5180;
345 border: $border-width solid var(--mainForegroundColor);
347 vertical-align: middle;
353 top: calc(2px - #{$border-width});
358 transform: rotate(45deg) scale(0);
359 border-right: 2px solid var(--mainBackgroundColor);
360 border-bottom: 2px solid var(--mainBackgroundColor);
365 border-color: transparent;
366 background: var(--mainColor);
367 animation: jelly 0.6s ease;
371 transform: rotate(45deg) scale(1);
377 font-weight: $font-regular;
384 &[disabled] + span + span{
391 @mixin avatar ($size) {
398 @mixin chevron ($size, $border-width) {
400 border-width: $border-width $border-width 0 0;
402 display: inline-block;
403 transform: rotate(-45deg);
408 @mixin chevron-right ($size, $border-width) {
409 @include chevron($size, $border-width);
412 transform: rotate(45deg);
415 @mixin chevron-left ($size, $border-width) {
416 @include chevron($size, $border-width);
419 transform: rotate(-135deg);
422 @mixin in-content-small-title {
423 text-transform: uppercase;
424 color: var(--mainColor);
425 font-weight: $font-bold;
430 @include disable-default-a-behaviour;
432 display: inline-table;
435 color: var(--mainForegroundColor);
442 @include avatar(18px);
450 @mixin sub-menu-with-actor {
453 flex-direction: column;
454 align-items: flex-start;
462 @include avatar(80px);
469 flex-direction: column;
470 justify-content: center;
476 .actor-display-name {
478 font-weight: $font-bold;
486 color: $grey-actor-name;
495 @include actor-owner;
511 @mixin create-button {
512 @include peertube-button-link;
513 @include orange-button;
514 @include button-with-icon(20px, 5px, -1px);
520 padding-bottom: 20px;
522 border-bottom: 1px solid #C6C6C6;
524 @media screen and (max-width: 800px) {
525 flex-direction: column;
531 @mixin dropdown-with-icon-item {