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 select-arrow-down {
229 right: calc(0% + 15px);
234 pointer-events: none;
235 border: 5px solid rgba(0, 0, 0, 0);
236 border-top-color: #000;
241 @mixin peertube-select-container ($width) {
244 border: 1px solid #C6C6C6;
248 background: var(--inputColor);
253 background-color: #E5E5E5;
260 @media screen and (max-width: $width) {
265 @include select-arrow-down;
269 padding: 0 35px 0 12px;
270 width: calc(100% + 2px);
275 background: transparent none;
278 height: $button-height;
279 text-overflow: ellipsis;
280 color: var(--mainForegroundColor);
288 text-shadow: 0 0 0 #000;
297 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
298 @mixin peertube-radio-container {
299 input[type="radio"] {
303 font-weight: $font-regular;
312 border: 1px solid #000;
313 display: inline-block;
316 vertical-align: middle;
323 &:checked + label:before {
324 background-color: #000;
325 box-shadow: inset 0 0 0 4px #fff;
328 &:focus + label:before {
335 @mixin peertube-checkbox ($border-width) {
340 outline: 1px solid #1e5180;
348 border: $border-width solid $fg-color;
350 vertical-align: middle;
356 top: calc(2px - #{$border-width});
361 transform: rotate(45deg) scale(0);
362 border-right: 2px solid $bg-color;
363 border-bottom: 2px solid $bg-color;
368 border-color: transparent;
369 background: $orange-color;
370 animation: jelly 0.6s ease;
374 transform: rotate(45deg) scale(1);
380 font-weight: $font-regular;
387 &[disabled] + span + span{
394 @mixin avatar ($size) {
402 @mixin chevron ($size, $border-width) {
404 border-width: $border-width $border-width 0 0;
406 display: inline-block;
407 transform: rotate(-45deg);
412 @mixin chevron-right ($size, $border-width) {
413 @include chevron($size, $border-width);
416 transform: rotate(45deg);
419 @mixin chevron-left ($size, $border-width) {
420 @include chevron($size, $border-width);
423 transform: rotate(-135deg);
426 @mixin in-content-small-title {
427 text-transform: uppercase;
428 color: var(--mainColor);
429 font-weight: $font-bold;
434 @include disable-default-a-behaviour;
436 display: inline-table;
439 color: var(--mainForegroundColor);
446 @include avatar(18px);
454 @mixin sub-menu-with-actor {
457 flex-direction: column;
458 align-items: flex-start;
466 @include avatar(80px);
473 flex-direction: column;
474 justify-content: center;
480 .actor-display-name {
482 font-weight: $font-bold;
490 color: $grey-actor-name;
499 @include actor-owner;
515 @mixin create-button {
516 @include peertube-button-link;
517 @include orange-button;
518 @include button-with-icon(20px, 5px, -1px);
524 padding-bottom: 20px;
526 border-bottom: 1px solid #C6C6C6;
528 @media screen and (max-width: 800px) {
529 flex-direction: column;
535 @mixin dropdown-with-icon-item {