3 @mixin disable-default-a-behaviour {
4 &:hover, &:focus, &:active {
5 text-decoration: none !important;
6 outline: none !important;
10 @mixin disable-outline {
20 * This mixin will crop text in block for needed amount of lines and put ellipsis at the end
22 * @param $font-size font-size property
23 * @param $line-height line-height property
24 * @param $lines-to-show amount of lines to show
26 @mixin ellipsis-multiline($font-size: 1rem, $line-height: 1, $lines-to-show: 2) {
28 /* Fallback for non-webkit */
30 max-height: $font-size*$line-height*$lines-to-show;
31 /* Fallback for non-webkit */
32 font-size: $font-size;
33 line-height: $line-height;
34 -webkit-line-clamp: $lines-to-show;
35 -webkit-box-orient: vertical;
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;
57 @mixin peertube-input-text($width) {
58 display: inline-block;
59 height: $button-height;
62 border: 1px solid #C6C6C6;
68 @mixin peertube-input-group($width) {
70 height: $button-height;
79 @mixin peertube-textarea ($width, $height) {
80 @include peertube-input-text($width);
87 @mixin orange-button {
88 &, &:active, &:focus {
90 background-color: $orange-color;
95 background-color: $orange-hoover-color;
98 &[disabled], &.disabled {
101 background-color: #C6C6C6;
106 &, &:active, &:focus {
107 background-color: $grey-color;
111 &:hover, &:active, &:focus, &[disabled], &.disabled {
113 background-color: $grey-hoover-color;
116 &[disabled], &.disabled {
121 @mixin peertube-button {
123 font-weight: $font-semibold;
125 height: $button-height;
126 line-height: $button-height;
129 padding: 0 17px 0 13px;
134 @mixin peertube-button-link {
135 display: inline-block;
137 @include disable-default-a-behaviour;
138 @include peertube-button;
141 @mixin peertube-button-file ($width) {
144 display: inline-block;
147 @include peertube-button;
148 @include orange-button;
158 filter: alpha(opacity=0);
167 @mixin icon ($size) {
168 display: inline-block;
169 background-repeat: no-repeat;
170 background-size: contain;
173 vertical-align: middle;
177 @mixin peertube-select-container ($width) {
180 border: 1px solid #C6C6C6;
190 right: calc(0% + 15px);
195 pointer-events: none;
196 border: 5px solid rgba(0, 0, 0, 0);
197 border-top-color: #000;
203 padding: 0 35px 0 12px;
204 width: calc(100% + 2px);
209 background: transparent none;
212 height: $button-height;
213 text-overflow: ellipsis;
221 text-shadow: 0 0 0 #000;
226 @mixin peertube-select-disabled-container ($width) {
227 @include peertube-select-container($width);
229 background-color: #E5E5E5;
236 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
237 @mixin peertube-radio-container {
238 input[type="radio"] {
242 font-weight: $font-regular;
251 border: 1px solid #000;
252 display: inline-block;
255 vertical-align: middle;
262 &:checked + label:before {
263 background-color: #000;
264 box-shadow: inset 0 0 0 4px #fff;
267 &:focus + label:before {
274 @mixin peertube-checkbox ($border-width) {
281 border: $border-width solid #000;
283 vertical-align: middle;
289 top: calc(2px - #{$border-width});
294 transform: rotate(45deg) scale(0);
295 border-right: 2px solid #fff;
296 border-bottom: 2px solid #fff;
301 border-color: transparent;
302 background: $orange-color;
303 animation: jelly 0.6s ease;
307 transform: rotate(45deg) scale(1);
313 font-weight: $font-regular;
320 &[disabled] + span + span{
327 @mixin avatar ($size) {
334 @mixin chevron ($size, $border-width) {
336 border-width: $border-width $border-width 0 0;
338 display: inline-block;
339 transform: rotate(-45deg);
344 @mixin chevron-right ($size, $border-width) {
345 @include chevron($size, $border-width);
348 transform: rotate(45deg);
351 @mixin chevron-left ($size, $border-width) {
352 @include chevron($size, $border-width);
355 transform: rotate(-135deg);
358 @mixin in-content-small-title {
359 text-transform: uppercase;
360 color: $orange-color;
361 font-weight: $font-bold;
366 @include disable-default-a-behaviour;
378 @include avatar(18px);
386 @mixin sub-menu-with-actor {
389 flex-direction: column;
398 @include avatar(80px);
405 flex-direction: column;
406 justify-content: center;
412 .actor-display-name {
414 font-weight: $font-bold;
422 color: $grey-actor-name;
431 @include actor-owner;
447 @mixin create-button ($imageUrl) {
448 @include peertube-button-link;
449 @include orange-button;
457 background-image: url($imageUrl);
464 padding-bottom: 20px;
466 border-bottom: 1px solid #C6C6C6;
468 @media screen and (max-width: 800px) {
469 flex-direction: column;
476 @mixin video-miniature-small-screen {
479 /deep/ .video-miniature {
485 .video-miniature-information {
486 width: 100% !important;