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) {
22 * This mixin will crop text in block for needed amount of lines and put ellipsis at the end
24 * @param $font-size font-size property
25 * @param $line-height line-height property
26 * @param $lines-to-show amount of lines to show
28 @mixin ellipsis-multiline($font-size: 1rem, $line-height: 1, $lines-to-show: 2) {
30 /* Fallback for non-webkit */
32 max-height: $font-size*$line-height*$lines-to-show;
33 /* Fallback for non-webkit */
34 font-size: $font-size;
35 line-height: $line-height;
36 -webkit-line-clamp: $lines-to-show;
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 peertube-input-text($width) {
59 display: inline-block;
60 height: $button-height;
62 background: var(--inputColor);
63 border: 1px solid #C6C6C6;
69 color: var(--inputPlaceholderColor);
73 @mixin peertube-input-group($width) {
75 height: $button-height;
85 @mixin peertube-textarea ($width, $height) {
86 @include peertube-input-text($width);
93 @mixin orange-button {
94 &, &:active, &:focus {
96 background-color: var(--mainColor);
101 background-color: var(--mainHoverColor);
104 &[disabled], &.disabled {
107 background-color: #C6C6C6;
112 &, &:active, &:focus {
113 background-color: $grey-color;
117 &:hover, &:active, &:focus, &[disabled], &.disabled {
119 background-color: $grey-hoover-color;
122 &[disabled], &.disabled {
127 @mixin peertube-button {
129 font-weight: $font-semibold;
131 height: $button-height;
132 line-height: $button-height;
135 padding: 0 17px 0 13px;
140 @mixin peertube-button-link {
141 display: inline-block;
143 @include disable-default-a-behaviour;
144 @include peertube-button;
147 @mixin peertube-button-file ($width) {
150 display: inline-block;
153 @include peertube-button;
154 @include orange-button;
164 filter: alpha(opacity=0);
173 @mixin icon ($size) {
174 display: inline-block;
175 background-repeat: no-repeat;
176 background-size: contain;
179 vertical-align: middle;
183 @mixin peertube-select-container ($width) {
186 border: 1px solid #C6C6C6;
190 background: var(--inputColor);
196 right: calc(0% + 15px);
201 pointer-events: none;
202 border: 5px solid rgba(0, 0, 0, 0);
203 border-top-color: #000;
209 padding: 0 35px 0 12px;
210 width: calc(100% + 2px);
215 background: transparent none;
218 height: $button-height;
219 text-overflow: ellipsis;
227 text-shadow: 0 0 0 #000;
232 @mixin peertube-select-disabled-container ($width) {
233 @include peertube-select-container($width);
235 background-color: #E5E5E5;
242 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
243 @mixin peertube-radio-container {
244 input[type="radio"] {
248 font-weight: $font-regular;
257 border: 1px solid #000;
258 display: inline-block;
261 vertical-align: middle;
268 &:checked + label:before {
269 background-color: #000;
270 box-shadow: inset 0 0 0 4px #fff;
273 &:focus + label:before {
280 @mixin peertube-checkbox ($border-width) {
287 border: $border-width solid var(--mainForegroundColor);
289 vertical-align: middle;
295 top: calc(2px - #{$border-width});
300 transform: rotate(45deg) scale(0);
301 border-right: 2px solid var(--mainBackgroundColor);
302 border-bottom: 2px solid var(--mainBackgroundColor);
307 border-color: transparent;
308 background: var(--mainColor);
309 animation: jelly 0.6s ease;
313 transform: rotate(45deg) scale(1);
319 font-weight: $font-regular;
326 &[disabled] + span + span{
333 @mixin avatar ($size) {
340 @mixin chevron ($size, $border-width) {
342 border-width: $border-width $border-width 0 0;
344 display: inline-block;
345 transform: rotate(-45deg);
350 @mixin chevron-right ($size, $border-width) {
351 @include chevron($size, $border-width);
354 transform: rotate(45deg);
357 @mixin chevron-left ($size, $border-width) {
358 @include chevron($size, $border-width);
361 transform: rotate(-135deg);
364 @mixin in-content-small-title {
365 text-transform: uppercase;
366 color: var(--mainColor);
367 font-weight: $font-bold;
372 @include disable-default-a-behaviour;
374 display: inline-table;
377 color: var(--mainForegroundColor);
384 @include avatar(18px);
392 @mixin sub-menu-with-actor {
395 flex-direction: column;
404 @include avatar(80px);
411 flex-direction: column;
412 justify-content: center;
418 .actor-display-name {
420 font-weight: $font-bold;
428 color: $grey-actor-name;
437 @include actor-owner;
453 @mixin create-button ($imageUrl) {
454 @include peertube-button-link;
455 @include orange-button;
463 background-image: url($imageUrl);
470 padding-bottom: 20px;
472 border-bottom: 1px solid #C6C6C6;
474 @media screen and (max-width: 800px) {
475 flex-direction: column;
482 @mixin video-miniature-small-screen {
485 /deep/ .video-miniature {
491 .video-miniature-information {
492 width: 100% !important;