]>
Commit | Line | Data |
---|---|---|
63c4db6d C |
1 | @import '_variables'; |
2 | ||
26c6ee80 | 3 | @mixin disable-default-a-behaviour { |
931d3430 C |
4 | &:hover, |
5 | &:focus, | |
6 | &:active { | |
26c6ee80 C |
7 | text-decoration: none !important; |
8 | outline: none !important; | |
9 | } | |
10 | } | |
c30745f3 | 11 | |
3ec8dc09 | 12 | @mixin disable-outline { |
e78980eb RK |
13 | &:focus:not(.focus-visible) { |
14 | outline: none; | |
15 | } | |
3ec8dc09 C |
16 | } |
17 | ||
ef80c66c C |
18 | @mixin ellipsis { |
19 | white-space: nowrap; | |
20 | overflow: hidden; | |
21 | text-overflow: ellipsis; | |
22 | } | |
0c9945d9 C |
23 | |
24 | @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) { | |
769ac6c1 RK |
25 | display: block; |
26 | /* Fallback for non-webkit */ | |
931d3430 | 27 | display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */ |
33253c1a | 28 | -webkit-line-clamp: $number-of-lines; |
769ac6c1 RK |
29 | /* Fallback for non-webkit */ |
30 | font-size: $font-size; | |
8fc02e47 | 31 | line-height: $font-size; |
769ac6c1 RK |
32 | overflow: hidden; |
33 | text-overflow: ellipsis; | |
33253c1a | 34 | max-height: $font-size * $number-of-lines; |
769ac6c1 RK |
35 | } |
36 | ||
60c35932 C |
37 | @mixin fade-text ($fade-after, $background-color) { |
38 | position: relative; | |
39 | overflow: hidden; | |
40 | ||
931d3430 | 41 | &::after { |
60c35932 C |
42 | content: ''; |
43 | pointer-events: none; | |
44 | width: 100%; | |
45 | height: 100%; | |
46 | position: absolute; | |
47 | left: 0; | |
48 | top: 0; | |
49 | background: linear-gradient(transparent $fade-after, $background-color); | |
769ac6c1 RK |
50 | } |
51 | } | |
52 | ||
06ec4bdd | 53 | @mixin peertube-word-wrap ($with-hyphen: true) { |
fc641ded | 54 | word-break: break-word; |
7a14004b C |
55 | word-wrap: break-word; |
56 | overflow-wrap: break-word; | |
06ec4bdd C |
57 | |
58 | @if $with-hyphen { | |
59 | hyphens: auto; | |
60 | } | |
7a14004b C |
61 | } |
62 | ||
457bb213 | 63 | @mixin apply-svg-color ($color) { |
c41c0e28 | 64 | ::ng-deep .feather, |
5351a058 C |
65 | ::ng-deep .material, |
66 | ::ng-deep .misc { | |
c41c0e28 RK |
67 | color: $color; |
68 | } | |
457bb213 C |
69 | } |
70 | ||
d3217560 RK |
71 | @mixin fill-svg-color ($color) { |
72 | ::ng-deep svg { | |
73 | path { | |
74 | fill: $color; | |
75 | } | |
76 | } | |
77 | } | |
78 | ||
a6d5ff76 RK |
79 | @mixin button-focus($color) { |
80 | &:focus, | |
e40afb5b | 81 | &.focus-visible { |
6a4c30de | 82 | box-shadow: #{$focus-box-shadow-form} $color; |
e40afb5b RK |
83 | } |
84 | } | |
85 | ||
c30745f3 C |
86 | @mixin peertube-input-text($width) { |
87 | display: inline-block; | |
88 | height: $button-height; | |
89 | width: $width; | |
e66883b3 RK |
90 | color: pvar(--inputForegroundColor); |
91 | background-color: pvar(--inputBackgroundColor); | |
c30745f3 C |
92 | border: 1px solid #C6C6C6; |
93 | border-radius: 3px; | |
94 | padding-left: 15px; | |
15ca2e87 | 95 | padding-right: 15px; |
17bb716b | 96 | font-size: 15px; |
9a0fc840 RK |
97 | |
98 | &::placeholder { | |
e66883b3 | 99 | color: pvar(--inputPlaceholderColor); |
9a0fc840 | 100 | } |
2860e62e | 101 | |
767bb14a C |
102 | &[readonly] { |
103 | opacity: 0.7; | |
104 | } | |
105 | ||
2860e62e C |
106 | @media screen and (max-width: $width) { |
107 | width: 100%; | |
108 | } | |
8a19bee1 | 109 | } |
c30745f3 | 110 | |
8a19bee1 C |
111 | @mixin peertube-input-group($width) { |
112 | width: $width; | |
2a53942d | 113 | min-height: $button-height; |
8a19bee1 C |
114 | padding-top: 0; |
115 | padding-bottom: 0; | |
832a12b0 | 116 | flex-wrap: nowrap; |
8a19bee1 | 117 | |
931d3430 | 118 | .input-group-text { |
8a19bee1 | 119 | font-size: 14px; |
931d3430 | 120 | color: #808080; |
c30745f3 C |
121 | } |
122 | } | |
123 | ||
5f0805d3 C |
124 | @mixin peertube-textarea ($width, $height) { |
125 | @include peertube-input-text($width); | |
126 | ||
e66883b3 RK |
127 | color: pvar(--textareaForegroundColor); |
128 | background-color: pvar(--textareaBackgroundColor); | |
5f0805d3 C |
129 | height: $height; |
130 | padding: 5px 15px; | |
131 | font-size: 15px; | |
132 | } | |
133 | ||
7b272fd7 | 134 | @mixin orange-button { |
e66883b3 | 135 | @include button-focus(pvar(--mainColorLightest)); |
e40afb5b | 136 | |
931d3430 C |
137 | &, |
138 | &:active, | |
139 | &:focus { | |
15a7387d | 140 | color: #fff; |
e66883b3 | 141 | background-color: pvar(--mainColor); |
15a7387d | 142 | } |
7b272fd7 | 143 | |
15a7387d | 144 | &:hover { |
0727cab0 | 145 | color: #fff; |
e66883b3 | 146 | background-color: pvar(--mainHoverColor); |
7b272fd7 | 147 | } |
4cc66133 | 148 | |
931d3430 C |
149 | &[disabled], |
150 | &.disabled { | |
4cc66133 | 151 | cursor: default; |
cadb46d8 C |
152 | color: #fff; |
153 | background-color: #C6C6C6; | |
4cc66133 | 154 | } |
457bb213 C |
155 | |
156 | my-global-icon { | |
931d3430 | 157 | @include apply-svg-color(#fff); |
457bb213 | 158 | } |
7b272fd7 C |
159 | } |
160 | ||
60c35932 C |
161 | @mixin orange-button-inverted { |
162 | @include button-focus(pvar(--mainColorLightest)); | |
163 | ||
164 | border: 2px solid pvar(--mainColor); | |
733dbc53 | 165 | font-weight: $font-semibold; |
60c35932 | 166 | |
931d3430 C |
167 | &, |
168 | &:active, | |
169 | &:focus { | |
60c35932 C |
170 | color: pvar(--mainColor); |
171 | background-color: pvar(--mainBackgroundColor); | |
172 | } | |
173 | ||
174 | &:hover { | |
175 | color: pvar(--mainColor); | |
176 | background-color: pvar(--mainColorLightest); | |
177 | } | |
178 | ||
931d3430 C |
179 | &[disabled], |
180 | &.disabled { | |
60c35932 C |
181 | cursor: default; |
182 | color: pvar(--mainColor); | |
183 | background-color: #C6C6C6; | |
184 | } | |
185 | ||
186 | my-global-icon { | |
931d3430 | 187 | @include apply-svg-color(pvar(--mainColor)); |
60c35932 C |
188 | } |
189 | } | |
190 | ||
54e78847 | 191 | @mixin tertiary-button { |
a6d5ff76 RK |
192 | @include button-focus($grey-button-outline-color); |
193 | ||
e66883b3 | 194 | color: pvar(--greyForegroundColor); |
54e78847 RK |
195 | background-color: transparent; |
196 | ||
931d3430 C |
197 | &[disabled], |
198 | .disabled { | |
54e78847 RK |
199 | cursor: default; |
200 | } | |
201 | ||
202 | my-global-icon { | |
931d3430 | 203 | @include apply-svg-color(transparent); |
54e78847 RK |
204 | } |
205 | } | |
206 | ||
7b272fd7 | 207 | @mixin grey-button { |
a6d5ff76 | 208 | @include button-focus($grey-button-outline-color); |
26171379 | 209 | |
1fe1e14c RK |
210 | background-color: $grey-background-color; |
211 | color: pvar(--greyForegroundColor); | |
7b272fd7 | 212 | |
931d3430 C |
213 | &:hover, |
214 | &:active, | |
215 | &:focus, | |
216 | &[disabled], | |
217 | &.disabled { | |
e66883b3 | 218 | color: pvar(--greyForegroundColor); |
457bb213 | 219 | background-color: $grey-background-hover-color; |
7b272fd7 | 220 | } |
4cc66133 | 221 | |
931d3430 C |
222 | &[disabled], |
223 | &.disabled { | |
4cc66133 C |
224 | cursor: default; |
225 | } | |
457bb213 C |
226 | |
227 | my-global-icon { | |
931d3430 | 228 | @include apply-svg-color(pvar(--greyForegroundColor)); |
457bb213 | 229 | } |
7b272fd7 C |
230 | } |
231 | ||
1fe1e14c RK |
232 | @mixin danger-button { |
233 | $color: lighten($color: #c54130, $amount: 10); | |
234 | $text: #fff6f5; | |
235 | ||
236 | @include button-focus(scale-color($color, $alpha: -95%)); | |
931d3430 | 237 | |
1fe1e14c RK |
238 | background-color: $color; |
239 | color: $text; | |
240 | ||
931d3430 C |
241 | &:hover, |
242 | &:active, | |
243 | &:focus, | |
244 | &[disabled], | |
245 | &.disabled { | |
1fe1e14c RK |
246 | background-color: lighten($color: $color, $amount: 10); |
247 | } | |
248 | ||
931d3430 C |
249 | &[disabled], |
250 | &.disabled { | |
1fe1e14c RK |
251 | cursor: default; |
252 | } | |
253 | ||
254 | my-global-icon { | |
931d3430 | 255 | @include apply-svg-color($text); |
1fe1e14c RK |
256 | } |
257 | } | |
258 | ||
c30745f3 | 259 | @mixin peertube-button { |
931d3430 | 260 | border: 0; |
c30745f3 C |
261 | font-weight: $font-semibold; |
262 | font-size: 15px; | |
263 | height: $button-height; | |
264 | line-height: $button-height; | |
266947e5 C |
265 | // FIXME: because of primeng that redefines border-radius of all input[type="..."] |
266 | border-radius: 3px !important; | |
c30745f3 | 267 | text-align: center; |
5beb89f2 | 268 | padding: 0 17px 0 13px; |
c30745f3 C |
269 | cursor: pointer; |
270 | } | |
271 | ||
272 | @mixin peertube-button-link { | |
c30745f3 | 273 | @include disable-default-a-behaviour; |
ce0e281d | 274 | @include peertube-button; |
2295ce6c | 275 | |
aa0f1963 | 276 | display: inline-block; |
931d3430 | 277 | } |
aa0f1963 | 278 | |
931d3430 | 279 | @mixin peertube-button-outline { |
aa0f1963 RK |
280 | @include disable-default-a-behaviour; |
281 | @include peertube-button; | |
282 | ||
931d3430 | 283 | display: inline-block; |
aa0f1963 RK |
284 | border: 1px solid; |
285 | } | |
286 | ||
457bb213 | 287 | @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) { |
26171379 C |
288 | display: inline-flex; |
289 | align-items: center; | |
290 | line-height: normal !important; | |
291 | ||
457bb213 C |
292 | my-global-icon { |
293 | position: relative; | |
294 | width: $width; | |
295 | margin-right: $margin-right; | |
296 | top: $top; | |
297 | } | |
298 | } | |
299 | ||
1ea7da81 | 300 | @mixin peertube-file { |
c5911fd3 C |
301 | position: relative; |
302 | overflow: hidden; | |
303 | display: inline-block; | |
e61151b0 | 304 | min-height: 30px; |
c5911fd3 | 305 | |
c5911fd3 C |
306 | input[type=file] { |
307 | position: absolute; | |
308 | top: 0; | |
309 | right: 0; | |
e61151b0 RK |
310 | width: 100%; |
311 | height: 100%; | |
c5911fd3 C |
312 | font-size: 100px; |
313 | text-align: right; | |
314 | filter: alpha(opacity=0); | |
315 | opacity: 0; | |
316 | outline: none; | |
931d3430 | 317 | background: #fff; |
c5911fd3 C |
318 | cursor: inherit; |
319 | display: block; | |
320 | } | |
321 | } | |
322 | ||
1ea7da81 | 323 | @mixin peertube-button-file ($width) { |
1ea7da81 RK |
324 | @include peertube-file; |
325 | @include peertube-button; | |
931d3430 C |
326 | |
327 | width: $width; | |
1ea7da81 RK |
328 | } |
329 | ||
0727cab0 C |
330 | @mixin icon ($size) { |
331 | display: inline-block; | |
332 | background-repeat: no-repeat; | |
333 | background-size: contain; | |
334 | width: $size; | |
335 | height: $size; | |
336 | vertical-align: middle; | |
337 | cursor: pointer; | |
338 | } | |
4cc66133 | 339 | |
d89fcd1e C |
340 | @mixin responsive-width ($width) { |
341 | width: $width; | |
342 | ||
343 | @media screen and (max-width: $width) { | |
344 | width: 100%; | |
345 | } | |
346 | } | |
52c4976f | 347 | |
15a7387d C |
348 | @mixin peertube-select-container ($width) { |
349 | padding: 0; | |
350 | margin: 0; | |
4cc66133 C |
351 | width: $width; |
352 | border-radius: 3px; | |
e66883b3 RK |
353 | color: pvar(--inputForegroundColor); |
354 | background: pvar(--inputBackgroundColor); | |
15a7387d | 355 | position: relative; |
5f0805d3 | 356 | font-size: 15px; |
15a7387d | 357 | |
2f4c784a C |
358 | &.disabled { |
359 | background-color: #E5E5E5; | |
360 | ||
361 | select { | |
362 | cursor: default; | |
363 | } | |
364 | } | |
365 | ||
2c3abc4f C |
366 | @media screen and (max-width: $width) { |
367 | width: 100%; | |
368 | } | |
369 | ||
931d3430 | 370 | &::after { |
bc4c9cc1 C |
371 | top: 50%; |
372 | right: calc(0% + 15px); | |
373 | content: ' '; | |
374 | height: 0; | |
375 | width: 0; | |
376 | position: absolute; | |
377 | pointer-events: none; | |
378 | border: 5px solid rgba(0, 0, 0, 0); | |
379 | border-top-color: #000; | |
380 | margin-top: -2px; | |
381 | z-index: 100; | |
15a7387d C |
382 | } |
383 | ||
384 | select { | |
108af661 | 385 | padding: 0 35px 0 12px; |
15a7387d | 386 | position: relative; |
a6d5ff76 | 387 | border: 1px solid #C6C6C6; |
15a7387d C |
388 | background: transparent none; |
389 | appearance: none; | |
390 | cursor: pointer; | |
391 | height: $button-height; | |
108af661 | 392 | text-overflow: ellipsis; |
e66883b3 | 393 | color: pvar(--mainForegroundColor); |
15a7387d C |
394 | |
395 | &:focus { | |
396 | outline: none; | |
397 | } | |
398 | ||
399 | &:-moz-focusring { | |
400 | color: transparent; | |
401 | text-shadow: 0 0 0 #000; | |
402 | } | |
aa879092 C |
403 | |
404 | option { | |
405 | color: #000; | |
406 | } | |
15a7387d | 407 | } |
654a188f RK |
408 | |
409 | &.peertube-select-button { | |
410 | @include grey-button; | |
411 | ||
412 | select, | |
413 | option { | |
414 | font-weight: $font-semibold; | |
415 | color: pvar(--greyForegroundColor); | |
931d3430 | 416 | border: 0; |
654a188f RK |
417 | } |
418 | } | |
15a7387d C |
419 | } |
420 | ||
5f0805d3 C |
421 | // Thanks: https://codepen.io/triss90/pen/XNEdRe/ |
422 | @mixin peertube-radio-container { | |
931d3430 | 423 | input[type=radio] { |
5f0805d3 C |
424 | display: none; |
425 | ||
931d3430 | 426 | + label { |
5f0805d3 C |
427 | font-weight: $font-regular; |
428 | cursor: pointer; | |
429 | ||
931d3430 | 430 | &::before { |
5f0805d3 C |
431 | position: relative; |
432 | top: -2px; | |
433 | content: ''; | |
434 | background: #fff; | |
435 | border-radius: 100%; | |
436 | border: 1px solid #000; | |
437 | display: inline-block; | |
438 | width: 15px; | |
439 | height: 15px; | |
440 | vertical-align: middle; | |
441 | cursor: pointer; | |
442 | text-align: center; | |
443 | margin-right: 10px; | |
444 | } | |
445 | } | |
446 | ||
931d3430 | 447 | &:checked + label::before { |
5f0805d3 C |
448 | background-color: #000; |
449 | box-shadow: inset 0 0 0 4px #fff; | |
450 | } | |
451 | ||
931d3430 | 452 | &:focus + label::before { |
5f0805d3 C |
453 | outline: none; |
454 | border-color: #000; | |
455 | } | |
456 | } | |
457 | } | |
458 | ||
a0d69908 | 459 | @mixin peertube-checkbox ($border-width) { |
1d5342ab | 460 | opacity: 0; |
776ca9b1 | 461 | position: absolute; |
1d5342ab C |
462 | |
463 | &:focus + span { | |
e66883b3 | 464 | box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest); |
1d5342ab | 465 | } |
a0d69908 | 466 | |
931d3430 | 467 | + span { |
a0d69908 C |
468 | position: relative; |
469 | width: 18px; | |
bc20aaed | 470 | min-width: 18px; |
a0d69908 | 471 | height: 18px; |
5fd3e00a | 472 | border: $border-width solid #C6C6C6; |
a0d69908 C |
473 | border-radius: 3px; |
474 | vertical-align: middle; | |
475 | cursor: pointer; | |
476 | ||
931d3430 | 477 | &::after { |
a0d69908 C |
478 | content: ''; |
479 | position: absolute; | |
480 | top: calc(2px - #{$border-width}); | |
481 | left: 5px; | |
482 | width: 5px; | |
483 | height: 12px; | |
484 | opacity: 0; | |
485 | transform: rotate(45deg) scale(0); | |
18c97728 C |
486 | border-right: 2px solid $bg-color; |
487 | border-bottom: 2px solid $bg-color; | |
a0d69908 C |
488 | } |
489 | } | |
490 | ||
0f7fedc3 | 491 | &:checked + span { |
a0d69908 | 492 | border-color: transparent; |
e66883b3 | 493 | background: pvar(--mainColor); |
a0d69908 C |
494 | animation: jelly 0.6s ease; |
495 | ||
931d3430 | 496 | &::after { |
a0d69908 C |
497 | opacity: 1; |
498 | transform: rotate(45deg) scale(1); | |
499 | } | |
500 | } | |
501 | ||
931d3430 | 502 | + span + span { |
a0d69908 C |
503 | font-size: 15px; |
504 | font-weight: $font-regular; | |
505 | margin-left: 5px; | |
506 | cursor: pointer; | |
6693df9d | 507 | display: inline; |
a0d69908 | 508 | } |
bbe0f064 | 509 | |
0f7fedc3 | 510 | &[disabled] + span, |
931d3430 | 511 | &[disabled] + span + span { |
bbe0f064 C |
512 | opacity: 0.5; |
513 | cursor: default; | |
514 | } | |
a0d69908 C |
515 | } |
516 | ||
654a188f RK |
517 | @mixin table-badge { |
518 | border-radius: 2px; | |
519 | padding: 1/4em 1/2em; | |
520 | text-transform: uppercase; | |
521 | font-weight: $font-bold; | |
522 | font-size: 12px; | |
523 | letter-spacing: 1/3px; | |
524 | ||
525 | &.badge-banned, | |
526 | &.badge-red { | |
527 | background-color: #ffcdd2; | |
528 | color: #c63737; | |
529 | } | |
530 | ||
531 | &.badge-banned { | |
532 | text-decoration: line-through; | |
533 | } | |
534 | ||
535 | &.badge-yellow { | |
536 | background-color: #feedaf; | |
537 | color: #8a5340; | |
538 | } | |
539 | ||
540 | &.badge-brown { | |
541 | background-color: #ffd8b2; | |
542 | color: #805b36; | |
543 | } | |
544 | ||
545 | &.badge-green { | |
546 | background-color: #c8e6c9; | |
547 | color: #256029; | |
548 | } | |
549 | ||
550 | &.badge-blue { | |
551 | background-color: #b3e5fc; | |
552 | color: #23547b; | |
553 | } | |
554 | ||
555 | &.badge-purple { | |
556 | background-color: #eccfff; | |
557 | color: #694382; | |
558 | } | |
559 | } | |
4e8c8728 | 560 | |
746018f6 C |
561 | @mixin actor-avatar-size ($size) { |
562 | display: inline-block; | |
60c35932 C |
563 | width: $size; |
564 | height: $size; | |
565 | min-width: $size; | |
566 | min-height: $size; | |
567 | } | |
568 | ||
c6352f2c C |
569 | @mixin chevron ($size, $border-width) { |
570 | border-style: solid; | |
571 | border-width: $border-width $border-width 0 0; | |
572 | content: ''; | |
573 | display: inline-block; | |
574 | transform: rotate(-45deg); | |
575 | height: $size; | |
576 | width: $size; | |
577 | } | |
578 | ||
579 | @mixin chevron-right ($size, $border-width) { | |
580 | @include chevron($size, $border-width); | |
581 | ||
582 | left: 0; | |
583 | transform: rotate(45deg); | |
584 | } | |
585 | ||
586 | @mixin chevron-left ($size, $border-width) { | |
587 | @include chevron($size, $border-width); | |
588 | ||
589 | left: 0.25em; | |
590 | transform: rotate(-135deg); | |
591 | } | |
0626e7af C |
592 | |
593 | @mixin in-content-small-title { | |
594 | text-transform: uppercase; | |
e66883b3 | 595 | color: pvar(--mainColor); |
0626e7af C |
596 | font-weight: $font-bold; |
597 | font-size: 13px; | |
170726f5 C |
598 | } |
599 | ||
482fa503 RK |
600 | @mixin settings-big-title { |
601 | text-transform: uppercase; | |
e66883b3 | 602 | color: pvar(--mainColor); |
482fa503 RK |
603 | font-weight: $font-bold; |
604 | font-size: 110%; | |
605 | margin-bottom: 10px; | |
606 | } | |
607 | ||
457bb213 | 608 | @mixin create-button { |
08c1efbe C |
609 | @include peertube-button-link; |
610 | @include orange-button; | |
457bb213 | 611 | @include button-with-icon(20px, 5px, -1px); |
a4f99a76 | 612 | } |
22a16e36 | 613 | |
0f7407d9 | 614 | @mixin row-blocks ($column-responsive: true) { |
22a16e36 C |
615 | display: flex; |
616 | min-height: 130px; | |
617 | padding-bottom: 20px; | |
618 | margin-bottom: 20px; | |
619 | border-bottom: 1px solid #C6C6C6; | |
620 | ||
0f7407d9 C |
621 | @media screen and (max-width: $small-view) { |
622 | @if $column-responsive { | |
623 | flex-direction: column; | |
624 | height: auto; | |
625 | align-items: center; | |
626 | } @else { | |
627 | min-height: initial; | |
628 | padding-bottom: 10px; | |
629 | margin-bottom: 10px; | |
630 | } | |
22a16e36 | 631 | } |
6aff854c | 632 | } |
c5a1ae50 C |
633 | |
634 | @mixin dropdown-with-icon-item { | |
bc584963 | 635 | padding: 6px 15px; |
c5a1ae50 C |
636 | |
637 | my-global-icon { | |
bc584963 RK |
638 | width: 22px; |
639 | opacity: .7; | |
c5a1ae50 C |
640 | |
641 | margin-right: 10px; | |
642 | position: relative; | |
643 | top: -2px; | |
644 | } | |
645 | } | |
e61151b0 | 646 | |
66927c05 | 647 | @mixin progressbar($small: false) { |
e61151b0 RK |
648 | background-color: $grey-background-color; |
649 | display: flex; | |
650 | height: 1rem; | |
651 | overflow: hidden; | |
652 | font-size: 0.75rem; | |
653 | border-radius: 0.25rem; | |
bc99dfe5 RK |
654 | position: relative; |
655 | ||
656 | span { | |
657 | position: absolute; | |
4f5d0459 | 658 | color: $grey-foreground-color; |
66927c05 RK |
659 | @if $small { |
660 | top: -1px; | |
661 | } | |
bc99dfe5 RK |
662 | |
663 | &:nth-of-type(1) { | |
664 | left: .2rem; | |
665 | } | |
666 | &:nth-of-type(2) { | |
667 | right: .2rem; | |
668 | } | |
669 | } | |
e61151b0 RK |
670 | |
671 | .progress-bar { | |
e66883b3 RK |
672 | color: pvar(--mainBackgroundColor); |
673 | background-color: pvar(--mainColor); | |
e61151b0 RK |
674 | display: flex; |
675 | flex-direction: column; | |
676 | justify-content: center; | |
677 | text-align: center; | |
678 | white-space: nowrap; | |
679 | transition: width 0.6s ease; | |
680 | ||
681 | &.secondary { | |
e66883b3 | 682 | background-color: pvar(--secondaryColor); |
e61151b0 | 683 | } |
d4132d3f RK |
684 | |
685 | &.red { | |
686 | background-color: lighten($color: #c54130, $amount: 10); | |
687 | } | |
e61151b0 RK |
688 | } |
689 | } | |
76314386 RK |
690 | |
691 | @mixin breadcrumb { | |
692 | display: flex; | |
693 | flex-wrap: wrap; | |
694 | padding: 0.75rem 1rem; | |
695 | margin-bottom: 1rem; | |
696 | list-style: none; | |
218f730c | 697 | background-color: pvar(--submenuBackgroundColor); |
76314386 RK |
698 | border-radius: 0.25rem; |
699 | ||
700 | .breadcrumb-item { | |
701 | display: flex; | |
702 | ||
703 | a { | |
e66883b3 | 704 | color: pvar(--mainColor); |
76314386 RK |
705 | } |
706 | ||
931d3430 | 707 | + .breadcrumb-item { |
76314386 RK |
708 | padding-left: 0.5rem; |
709 | &::before { | |
710 | display: inline-block; | |
711 | padding-right: 0.5rem; | |
712 | color: #6c757d; | |
931d3430 | 713 | content: '/'; |
76314386 RK |
714 | } |
715 | } | |
716 | ||
717 | &.active { | |
718 | color: #6c757d; | |
719 | } | |
720 | } | |
721 | } | |
722 | ||
723 | @mixin dashboard { | |
724 | display: flex; | |
725 | flex-wrap: wrap; | |
726 | margin: 0 -5px; | |
727 | ||
931d3430 | 728 | > div { |
76314386 RK |
729 | box-sizing: border-box; |
730 | flex: 0 0 percentage(1/3); | |
731 | padding: 0 5px; | |
732 | margin-bottom: 10px; | |
733 | ||
931d3430 | 734 | > a { |
d1261d9a RK |
735 | @include disable-default-a-behaviour; |
736 | ||
76314386 RK |
737 | text-decoration: none; |
738 | color: inherit; | |
739 | display: block; | |
740 | font-size: 18px; | |
741 | ||
742 | &:active, | |
743 | &:focus, | |
744 | &:hover { | |
745 | opacity: .8; | |
746 | } | |
747 | } | |
748 | ||
931d3430 C |
749 | > a, |
750 | > div { | |
76314386 | 751 | padding: 20px; |
218f730c | 752 | background: pvar(--submenuBackgroundColor); |
76314386 RK |
753 | border-radius: 4px; |
754 | box-sizing: border-box; | |
755 | height: 100%; | |
756 | } | |
757 | } | |
758 | ||
931d3430 C |
759 | .dashboard-num, |
760 | .dashboard-text { | |
76314386 RK |
761 | text-align: center; |
762 | font-size: 130%; | |
e66883b3 | 763 | color: pvar(--mainForegroundColor); |
76314386 RK |
764 | line-height: 30px; |
765 | margin-bottom: 20px; | |
766 | } | |
767 | ||
768 | .dashboard-label { | |
769 | font-size: 90%; | |
e66883b3 | 770 | color: pvar(--inputPlaceholderColor); |
76314386 RK |
771 | text-align: center; |
772 | } | |
773 | } | |
a6d5ff76 | 774 | |
218f730c | 775 | @mixin divider($color: pvar(--submenuBackgroundColor), $background: pvar(--mainBackgroundColor)) { |
b515c98c RK |
776 | width: 95%; |
777 | border-top: .05rem solid $color; | |
778 | height: .05rem; | |
779 | text-align: center; | |
780 | display: block; | |
781 | position: relative; | |
782 | ||
783 | &[data-content] { | |
784 | margin: .8rem 0; | |
785 | ||
786 | &::after { | |
787 | background: $background; | |
788 | color: $color; | |
789 | content: attr(data-content); | |
790 | display: inline-block; | |
791 | font-size: .7rem; | |
792 | padding: 0 .4rem; | |
793 | transform: translateY(-.65rem); | |
794 | } | |
795 | } | |
796 | } | |
d6af8146 RK |
797 | |
798 | @mixin chip { | |
1ebddadd RK |
799 | --chip-radius: 5rem; |
800 | --chip-padding: .2rem .4rem; | |
d6af8146 RK |
801 | $avatar-height: 1.2rem; |
802 | ||
803 | align-items: center; | |
1ebddadd | 804 | border-radius: var(--chip-radius); |
d6af8146 RK |
805 | display: inline-flex; |
806 | font-size: 90%; | |
e66883b3 | 807 | color: pvar(--mainForegroundColor); |
d6af8146 | 808 | height: $avatar-height; |
06827932 | 809 | line-height: 1rem; |
d6af8146 RK |
810 | margin: .1rem; |
811 | max-width: 320px; | |
812 | overflow: hidden; | |
1ebddadd | 813 | padding: var(--chip-padding); |
d6af8146 RK |
814 | text-decoration: none; |
815 | text-overflow: ellipsis; | |
816 | vertical-align: middle; | |
817 | white-space: nowrap; | |
818 | ||
1ebddadd RK |
819 | &.rectangular { |
820 | --chip-radius: .2rem; | |
821 | --chip-padding: .2rem .3rem; | |
822 | } | |
823 | ||
f6e98f0a | 824 | my-actor-avatar { |
d6af8146 RK |
825 | margin-left: -.4rem; |
826 | margin-right: .2rem; | |
d6af8146 RK |
827 | } |
828 | ||
829 | &.two-lines { | |
36f772fd | 830 | $avatar-height: 2rem; |
d6af8146 RK |
831 | |
832 | height: $avatar-height; | |
833 | ||
f6e98f0a C |
834 | my-actor-avatar { |
835 | @include actor-avatar-size($avatar-height); | |
d6af8146 RK |
836 | } |
837 | ||
838 | div { | |
839 | display: flex; | |
840 | flex-direction: column; | |
d6af8146 RK |
841 | height: $avatar-height; |
842 | margin-left: .1rem; | |
843 | margin-right: .1rem; | |
844 | justify-content: center; | |
845 | } | |
846 | } | |
847 | } | |
7a03209d | 848 | |
cdeddff1 C |
849 | // applies ratio (default to 16:9) to a child element (using $selector) only using |
850 | // an immediate's parent size. This allows to set a ratio without explicit | |
e66883b3 | 851 | // dimensions, as width/height cannot be computed from each other. |
cdeddff1 C |
852 | @mixin block-ratio ($selector: 'div', $inverted-ratio: 9/16) { |
853 | $padding-percent: percentage($inverted-ratio); | |
854 | ||
e66883b3 RK |
855 | position: relative; |
856 | height: 0; | |
857 | width: 100%; | |
cdeddff1 | 858 | padding-top: $padding-percent; |
e66883b3 RK |
859 | |
860 | #{$selector} { | |
861 | position: absolute; | |
862 | width: 100%; | |
863 | height: 100%; | |
864 | top: 0; | |
865 | @content; | |
866 | } | |
867 | } | |
ed5bb517 K |
868 | |
869 | @mixin sub-menu-h1 { | |
870 | ::ng-deep h1 { | |
871 | font-size: 1.3rem; | |
872 | border-bottom: 2px solid $grey-background-color; | |
873 | padding-bottom: 15px; | |
874 | margin-bottom: $sub-menu-margin-bottom; | |
875 | ||
cd262619 | 876 | > span > my-global-icon, |
205e4f56 | 877 | > my-global-icon { |
ed5bb517 | 878 | margin-right: 10px; |
ed5bb517 K |
879 | width: 24px; |
880 | height: 24px; | |
cd262619 | 881 | vertical-align: top; |
ed5bb517 K |
882 | } |
883 | ||
884 | .badge { | |
885 | margin-left: 7px; | |
cd262619 | 886 | vertical-align: top; |
ed5bb517 K |
887 | } |
888 | } | |
889 | } | |
4572c3d0 C |
890 | |
891 | @mixin play-icon ($width, $height) { | |
892 | width: 0; | |
893 | height: 0; | |
894 | ||
895 | position: absolute; | |
896 | left: 50%; | |
897 | top: 50%; | |
898 | transform: translate(-50%, -50%) scale(0.5); | |
899 | ||
900 | border-top: ($height / 2) solid transparent; | |
901 | border-bottom: ($height / 2) solid transparent; | |
902 | ||
903 | border-left: $width solid rgba(255, 255, 255, 0.95); | |
904 | } | |
0f7407d9 C |
905 | |
906 | @mixin on-small-main-col () { | |
907 | :host-context(.main-col:not(.expanded)) { | |
908 | @media screen and (max-width: $small-view + $menu-width) { | |
909 | @content; | |
910 | } | |
911 | } | |
912 | ||
913 | :host-context(.main-col.expanded) { | |
914 | @media screen and (max-width: $small-view) { | |
915 | @content; | |
916 | } | |
917 | } | |
918 | } | |
919 | ||
920 | @mixin on-mobile-main-col () { | |
921 | :host-context(.main-col:not(.expanded)) { | |
922 | @media screen and (max-width: $mobile-view + $menu-width) { | |
923 | @content; | |
924 | } | |
925 | } | |
926 | ||
927 | :host-context(.main-col.expanded) { | |
928 | @media screen and (max-width: $mobile-view) { | |
929 | @content; | |
930 | } | |
931 | } | |
932 | } |