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 apply-svg-color ($color) {
60 path[fill="#000000"], g[fill="#000000"], rect[fill="#000000"], circle[fill="#000000"] {
64 path[stroke="#000000"], g[stroke="#000000"], rect[stroke="#000000"], circle[stroke="#000000"] {
70 @mixin peertube-input-text($width) {
71 display: inline-block;
72 height: $button-height;
74 background: var(--inputColor);
75 border: 1px solid #C6C6C6;
82 color: var(--inputPlaceholderColor);
85 @media screen and (max-width: $width) {
90 @mixin peertube-input-group($width) {
92 height: $button-height;
102 @mixin peertube-textarea ($width, $height) {
103 @include peertube-input-text($width);
110 @mixin orange-button {
111 &, &:active, &:focus {
113 background-color: var(--mainColor);
118 background-color: var(--mainHoverColor);
121 &[disabled], &.disabled {
124 background-color: #C6C6C6;
128 @include apply-svg-color(#fff)
133 &, &:active, &:focus {
134 background-color: $grey-background-color;
135 color: $grey-foreground-color;
138 &:hover, &:active, &:focus, &[disabled], &.disabled {
139 color: $grey-foreground-color;
140 background-color: $grey-background-hover-color;
143 &[disabled], &.disabled {
148 @include apply-svg-color($grey-foreground-color)
152 @mixin peertube-button {
154 font-weight: $font-semibold;
156 height: $button-height;
157 line-height: $button-height;
160 padding: 0 17px 0 13px;
165 @mixin peertube-button-link {
166 display: inline-block;
168 @include disable-default-a-behaviour;
169 @include peertube-button;
172 @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) {
176 margin-right: $margin-right;
181 @mixin peertube-button-file ($width) {
184 display: inline-block;
187 @include peertube-button;
188 @include orange-button;
198 filter: alpha(opacity=0);
207 @mixin icon ($size) {
208 display: inline-block;
209 background-repeat: no-repeat;
210 background-size: contain;
213 vertical-align: middle;
217 @mixin peertube-select-container ($width) {
220 border: 1px solid #C6C6C6;
224 background: var(--inputColor);
230 right: calc(0% + 15px);
235 pointer-events: none;
236 border: 5px solid rgba(0, 0, 0, 0);
237 border-top-color: #000;
243 padding: 0 35px 0 12px;
244 width: calc(100% + 2px);
249 background: transparent none;
252 height: $button-height;
253 text-overflow: ellipsis;
254 color: var(--mainForegroundColor);
262 text-shadow: 0 0 0 #000;
271 @mixin peertube-select-disabled-container ($width) {
272 @include peertube-select-container($width);
274 background-color: #E5E5E5;
281 // Thanks: https://codepen.io/triss90/pen/XNEdRe/
282 @mixin peertube-radio-container {
283 input[type="radio"] {
287 font-weight: $font-regular;
296 border: 1px solid #000;
297 display: inline-block;
300 vertical-align: middle;
307 &:checked + label:before {
308 background-color: #000;
309 box-shadow: inset 0 0 0 4px #fff;
312 &:focus + label:before {
319 @mixin peertube-checkbox ($border-width) {
326 border: $border-width solid var(--mainForegroundColor);
328 vertical-align: middle;
334 top: calc(2px - #{$border-width});
339 transform: rotate(45deg) scale(0);
340 border-right: 2px solid var(--mainBackgroundColor);
341 border-bottom: 2px solid var(--mainBackgroundColor);
346 border-color: transparent;
347 background: var(--mainColor);
348 animation: jelly 0.6s ease;
352 transform: rotate(45deg) scale(1);
358 font-weight: $font-regular;
365 &[disabled] + span + span{
372 @mixin avatar ($size) {
379 @mixin chevron ($size, $border-width) {
381 border-width: $border-width $border-width 0 0;
383 display: inline-block;
384 transform: rotate(-45deg);
389 @mixin chevron-right ($size, $border-width) {
390 @include chevron($size, $border-width);
393 transform: rotate(45deg);
396 @mixin chevron-left ($size, $border-width) {
397 @include chevron($size, $border-width);
400 transform: rotate(-135deg);
403 @mixin in-content-small-title {
404 text-transform: uppercase;
405 color: var(--mainColor);
406 font-weight: $font-bold;
411 @include disable-default-a-behaviour;
413 display: inline-table;
416 color: var(--mainForegroundColor);
423 @include avatar(18px);
431 @mixin sub-menu-with-actor {
434 flex-direction: column;
443 @include avatar(80px);
450 flex-direction: column;
451 justify-content: center;
457 .actor-display-name {
459 font-weight: $font-bold;
467 color: $grey-actor-name;
476 @include actor-owner;
492 @mixin create-button {
493 @include peertube-button-link;
494 @include orange-button;
495 @include button-with-icon(20px, 5px, -1px);
501 padding-bottom: 20px;
503 border-bottom: 1px solid #C6C6C6;
505 @media screen and (max-width: 800px) {
506 flex-direction: column;
513 @mixin video-miniature-small-screen {
516 /deep/ .video-miniature {
522 .video-miniature-information {
523 width: 100% !important;