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);
240 right: calc(0% + 15px);
245 pointer-events: none;
246 border: 5px solid rgba(0, 0, 0, 0);
247 border-top-color: #000;
253 padding: 0 35px 0 12px;
254 width: calc(100% + 2px);
259 background: transparent none;
262 height: $button-height;
263 text-overflow: ellipsis;
264 color: var(--mainForegroundColor);
272 text-shadow: 0 0 0 #000;
281 @mixin peertube-select-disabled-container ($width) {
282 @include peertube-select-container($width);
284 background-color: #E5E5E5;
291 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
292 @mixin peertube-radio-container {
293 input[type="radio"] {
297 font-weight: $font-regular;
306 border: 1px solid #000;
307 display: inline-block;
310 vertical-align: middle;
317 &:checked + label:before {
318 background-color: #000;
319 box-shadow: inset 0 0 0 4px #fff;
322 &:focus + label:before {
329 @mixin peertube-checkbox ($border-width) {
336 border: $border-width solid var(--mainForegroundColor);
338 vertical-align: middle;
344 top: calc(2px - #{$border-width});
349 transform: rotate(45deg) scale(0);
350 border-right: 2px solid var(--mainBackgroundColor);
351 border-bottom: 2px solid var(--mainBackgroundColor);
356 border-color: transparent;
357 background: var(--mainColor);
358 animation: jelly 0.6s ease;
362 transform: rotate(45deg) scale(1);
368 font-weight: $font-regular;
375 &[disabled] + span + span{
382 @mixin avatar ($size) {
389 @mixin chevron ($size, $border-width) {
391 border-width: $border-width $border-width 0 0;
393 display: inline-block;
394 transform: rotate(-45deg);
399 @mixin chevron-right ($size, $border-width) {
400 @include chevron($size, $border-width);
403 transform: rotate(45deg);
406 @mixin chevron-left ($size, $border-width) {
407 @include chevron($size, $border-width);
410 transform: rotate(-135deg);
413 @mixin in-content-small-title {
414 text-transform: uppercase;
415 color: var(--mainColor);
416 font-weight: $font-bold;
421 @include disable-default-a-behaviour;
423 display: inline-table;
426 color: var(--mainForegroundColor);
433 @include avatar(18px);
441 @mixin sub-menu-with-actor {
444 flex-direction: column;
445 align-items: flex-start;
453 @include avatar(80px);
460 flex-direction: column;
461 justify-content: center;
467 .actor-display-name {
469 font-weight: $font-bold;
477 color: $grey-actor-name;
486 @include actor-owner;
502 @mixin create-button {
503 @include peertube-button-link;
504 @include orange-button;
505 @include button-with-icon(20px, 5px, -1px);
511 padding-bottom: 20px;
513 border-bottom: 1px solid #C6C6C6;
515 @media screen and (max-width: 800px) {
516 flex-direction: column;
522 @mixin dropdown-with-icon-item {