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 - 0.1;
36 -webkit-line-clamp: $number-of-lines;
37 -webkit-box-orient: vertical;
39 text-overflow: ellipsis;
42 @mixin prefix($property, $parameters...) {
43 @each $prefix in -webkit-, -moz-, -ms-, -o-, "" {
44 #{$prefix}#{$property}: $parameters;
48 @mixin peertube-word-wrap {
50 word-wrap: break-word;
51 overflow-wrap: break-word;
52 -webkit-hyphens: auto;
58 @mixin apply-svg-color ($color) {
63 circle[fill="#000000"],
64 polygon[fill="#000000"] {
68 path[stroke="#000000"],
70 rect[stroke="#000000"],
71 circle[stroke="#000000"],
72 polygon[stroke="#000000"] {
76 stop[stop-color="#000000"] {
82 @mixin peertube-input-text($width) {
83 display: inline-block;
84 height: $button-height;
86 background: var(--inputColor);
87 border: 1px solid #C6C6C6;
94 color: var(--inputPlaceholderColor);
97 @media screen and (max-width: $width) {
102 @mixin peertube-input-group($width) {
104 height: $button-height;
114 @mixin peertube-textarea ($width, $height) {
115 @include peertube-input-text($width);
122 @mixin orange-button {
123 &, &:active, &:focus {
125 background-color: var(--mainColor);
130 background-color: var(--mainHoverColor);
133 &[disabled], &.disabled {
136 background-color: #C6C6C6;
140 @include apply-svg-color(#fff)
145 &, &:active, &:focus {
146 background-color: $grey-background-color;
147 color: $grey-foreground-color;
150 &:hover, &:active, &:focus, &[disabled], &.disabled {
151 color: $grey-foreground-color;
152 background-color: $grey-background-hover-color;
155 &[disabled], &.disabled {
160 @include apply-svg-color($grey-foreground-color)
164 @mixin peertube-button {
166 font-weight: $font-semibold;
168 height: $button-height;
169 line-height: $button-height;
172 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 button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
188 margin-right: $margin-right;
193 @mixin peertube-button-file ($width) {
196 display: inline-block;
199 @include peertube-button;
200 @include orange-button;
210 filter: alpha(opacity=0);
219 @mixin icon ($size) {
220 display: inline-block;
221 background-repeat: no-repeat;
222 background-size: contain;
225 vertical-align: middle;
229 @mixin peertube-select-container ($width) {
232 border: 1px solid #C6C6C6;
236 background: var(--inputColor);
242 right: calc(0% + 15px);
247 pointer-events: none;
248 border: 5px solid rgba(0, 0, 0, 0);
249 border-top-color: #000;
255 padding: 0 35px 0 12px;
256 width: calc(100% + 2px);
261 background: transparent none;
264 height: $button-height;
265 text-overflow: ellipsis;
266 color: var(--mainForegroundColor);
274 text-shadow: 0 0 0 #000;
283 @mixin peertube-select-disabled-container ($width) {
284 @include peertube-select-container($width);
286 background-color: #E5E5E5;
293 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
294 @mixin peertube-radio-container {
295 input[type="radio"] {
299 font-weight: $font-regular;
308 border: 1px solid #000;
309 display: inline-block;
312 vertical-align: middle;
319 &:checked + label:before {
320 background-color: #000;
321 box-shadow: inset 0 0 0 4px #fff;
324 &:focus + label:before {
331 @mixin peertube-checkbox ($border-width) {
338 border: $border-width solid var(--mainForegroundColor);
340 vertical-align: middle;
346 top: calc(2px - #{$border-width});
351 transform: rotate(45deg) scale(0);
352 border-right: 2px solid var(--mainBackgroundColor);
353 border-bottom: 2px solid var(--mainBackgroundColor);
358 border-color: transparent;
359 background: var(--mainColor);
360 animation: jelly 0.6s ease;
364 transform: rotate(45deg) scale(1);
370 font-weight: $font-regular;
377 &[disabled] + span + span{
384 @mixin avatar ($size) {
391 @mixin chevron ($size, $border-width) {
393 border-width: $border-width $border-width 0 0;
395 display: inline-block;
396 transform: rotate(-45deg);
401 @mixin chevron-right ($size, $border-width) {
402 @include chevron($size, $border-width);
405 transform: rotate(45deg);
408 @mixin chevron-left ($size, $border-width) {
409 @include chevron($size, $border-width);
412 transform: rotate(-135deg);
415 @mixin in-content-small-title {
416 text-transform: uppercase;
417 color: var(--mainColor);
418 font-weight: $font-bold;
423 @include disable-default-a-behaviour;
425 display: inline-table;
428 color: var(--mainForegroundColor);
435 @include avatar(18px);
443 @mixin sub-menu-with-actor {
446 flex-direction: column;
447 align-items: flex-start;
455 @include avatar(80px);
462 flex-direction: column;
463 justify-content: center;
469 .actor-display-name {
471 font-weight: $font-bold;
479 color: $grey-actor-name;
488 @include actor-owner;
504 @mixin create-button {
505 @include peertube-button-link;
506 @include orange-button;
507 @include button-with-icon(20px, 5px, -1px);
513 padding-bottom: 20px;
515 border-bottom: 1px solid #C6C6C6;
517 @media screen and (max-width: 800px) {
518 flex-direction: column;
525 @mixin dropdown-with-icon-item {