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