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 * This mixin will crop text in block for needed amount of lines and put ellipsis at the end
30 * @param $font-size font-size property
31 * @param $line-height line-height property
32 * @param $lines-to-show amount of lines to show
34 @mixin ellipsis-multiline($font-size: 1rem, $line-height: 1, $lines-to-show: 2) {
36 /* Fallback for non-webkit */
38 max-height: $font-size * $line-height * $lines-to-show;
39 /* Fallback for non-webkit */
40 font-size: $font-size;
41 line-height: $line-height;
42 -webkit-line-clamp: $lines-to-show;
43 -webkit-box-orient: vertical;
45 text-overflow: ellipsis;
48 @mixin prefix($property, $parameters...) {
49 @each $prefix in -webkit-, -moz-, -ms-, -o-, "" {
50 #{$prefix}#{$property}: $parameters;
54 @mixin peertube-word-wrap {
56 word-wrap: break-word;
57 overflow-wrap: break-word;
58 -webkit-hyphens: auto;
64 @mixin apply-svg-color ($color) {
66 path[fill="#000000"], g[fill="#000000"], rect[fill="#000000"], circle[fill="#000000"] {
70 path[stroke="#000000"], g[stroke="#000000"], rect[stroke="#000000"], circle[stroke="#000000"] {
76 @mixin peertube-input-text($width) {
77 display: inline-block;
78 height: $button-height;
80 background: var(--inputColor);
81 border: 1px solid #C6C6C6;
88 color: var(--inputPlaceholderColor);
91 @media screen and (max-width: $width) {
96 @mixin peertube-input-group($width) {
98 height: $button-height;
108 @mixin peertube-textarea ($width, $height) {
109 @include peertube-input-text($width);
116 @mixin orange-button {
117 &, &:active, &:focus {
119 background-color: var(--mainColor);
124 background-color: var(--mainHoverColor);
127 &[disabled], &.disabled {
130 background-color: #C6C6C6;
134 @include apply-svg-color(#fff)
139 &, &:active, &:focus {
140 background-color: $grey-background-color;
141 color: $grey-foreground-color;
144 &:hover, &:active, &:focus, &[disabled], &.disabled {
145 color: $grey-foreground-color;
146 background-color: $grey-background-hover-color;
149 &[disabled], &.disabled {
154 @include apply-svg-color($grey-foreground-color)
158 @mixin peertube-button {
160 font-weight: $font-semibold;
162 height: $button-height;
163 line-height: $button-height;
166 padding: 0 17px 0 13px;
171 @mixin peertube-button-link {
172 display: inline-block;
174 @include disable-default-a-behaviour;
175 @include peertube-button;
178 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
182 margin-right: $margin-right;
187 @mixin peertube-button-file ($width) {
190 display: inline-block;
193 @include peertube-button;
194 @include orange-button;
204 filter: alpha(opacity=0);
213 @mixin icon ($size) {
214 display: inline-block;
215 background-repeat: no-repeat;
216 background-size: contain;
219 vertical-align: middle;
223 @mixin peertube-select-container ($width) {
226 border: 1px solid #C6C6C6;
230 background: var(--inputColor);
236 right: calc(0% + 15px);
241 pointer-events: none;
242 border: 5px solid rgba(0, 0, 0, 0);
243 border-top-color: #000;
249 padding: 0 35px 0 12px;
250 width: calc(100% + 2px);
255 background: transparent none;
258 height: $button-height;
259 text-overflow: ellipsis;
260 color: var(--mainForegroundColor);
268 text-shadow: 0 0 0 #000;
277 @mixin peertube-select-disabled-container ($width) {
278 @include peertube-select-container($width);
280 background-color: #E5E5E5;
287 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
288 @mixin peertube-radio-container {
289 input[type="radio"] {
293 font-weight: $font-regular;
302 border: 1px solid #000;
303 display: inline-block;
306 vertical-align: middle;
313 &:checked + label:before {
314 background-color: #000;
315 box-shadow: inset 0 0 0 4px #fff;
318 &:focus + label:before {
325 @mixin peertube-checkbox ($border-width) {
332 border: $border-width solid var(--mainForegroundColor);
334 vertical-align: middle;
340 top: calc(2px - #{$border-width});
345 transform: rotate(45deg) scale(0);
346 border-right: 2px solid var(--mainBackgroundColor);
347 border-bottom: 2px solid var(--mainBackgroundColor);
352 border-color: transparent;
353 background: var(--mainColor);
354 animation: jelly 0.6s ease;
358 transform: rotate(45deg) scale(1);
364 font-weight: $font-regular;
371 &[disabled] + span + span{
378 @mixin avatar ($size) {
385 @mixin chevron ($size, $border-width) {
387 border-width: $border-width $border-width 0 0;
389 display: inline-block;
390 transform: rotate(-45deg);
395 @mixin chevron-right ($size, $border-width) {
396 @include chevron($size, $border-width);
399 transform: rotate(45deg);
402 @mixin chevron-left ($size, $border-width) {
403 @include chevron($size, $border-width);
406 transform: rotate(-135deg);
409 @mixin in-content-small-title {
410 text-transform: uppercase;
411 color: var(--mainColor);
412 font-weight: $font-bold;
417 @include disable-default-a-behaviour;
419 display: inline-table;
422 color: var(--mainForegroundColor);
429 @include avatar(18px);
437 @mixin sub-menu-with-actor {
440 flex-direction: column;
441 align-items: flex-start;
449 @include avatar(80px);
456 flex-direction: column;
457 justify-content: center;
463 .actor-display-name {
465 font-weight: $font-bold;
473 color: $grey-actor-name;
482 @include actor-owner;
498 @mixin create-button {
499 @include peertube-button-link;
500 @include orange-button;
501 @include button-with-icon(20px, 5px, -1px);
507 padding-bottom: 20px;
509 border-bottom: 1px solid #C6C6C6;
511 @media screen and (max-width: 800px) {
512 flex-direction: column;