]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/primeng-custom.scss
fix duplicate id in svg, empty alt in base email
[github/Chocobozzz/PeerTube.git] / client / src / sass / primeng-custom.scss
CommitLineData
bbe0f064
C
1@import '_variables';
2@import '_mixins';
3
4@import '~primeng/resources/primeng.css';
276d9652 5@import '~primeng/resources/themes/nova-light/theme.css';
bbe0f064
C
6
7@mixin glyphicon-light {
8 font-family: 'Glyphicons Halflings';
9 text-decoration: none !important;
1fd3ef3f 10 color: var(--mainForegroundColor) !important;
7738273b 11 font-display: swap;
bbe0f064
C
12}
13
bf64ed41
RK
14my-edit-button,
15my-delete-button,
16my-button {
17 height: max-content;
18}
19
2bc9bd08
RK
20// focus box-shadow for primeng
21.ui-inputtext:enabled:focus:not(.ui-state-error) {
22 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest) !important;
23}
24
bbe0f064
C
25// data table customizations
26p-table {
791645e6 27 .ui-table-caption {
276d9652 28 border: none !important;
f2fab901 29 background-color: var(--mainBackgroundColor) !important;
b014b6b9
C
30
31 .caption {
32 height: 40px;
25a42e29
RK
33 width: 100%;
34 display: inline-flex;
b014b6b9 35 align-items: center;
0d3a2982
RK
36
37 .input-group-text {
38 background-color: transparent;
39 }
b014b6b9 40 }
791645e6
C
41 }
42
276d9652 43 th {
f2fab901 44 background-color: var(--mainBackgroundColor) !important;
276d9652
C
45 outline: 0;
46 }
47
48 td, th {
49 font-family: $main-fonts;
50 font-size: 15px !important;
51 color: var(--mainForegroundColor) !important;
52 }
53
bbe0f064 54 td {
bbe0f064 55 padding-left: 15px !important;
141b177d 56
566c125d 57 &:not(.action-cell):not(.expand-cell) {
141b177d
C
58 overflow: hidden !important;
59 text-overflow: ellipsis !important;
60 white-space: nowrap !important;
61 }
bbe0f064
C
62 }
63
64 tr {
276d9652 65 outline: 0;
c13e2bf3 66 background-color: var(--mainBackgroundColor) !important;
bbe0f064 67 height: 46px;
791645e6
C
68
69 &.ui-state-highlight {
276d9652
C
70 background-color: var(--submenuColor) !important;
71
72 td, td > a {
73 color: var(--mainForegroundColor) !important;
74 }
791645e6 75 }
bbe0f064
C
76 }
77
78 .ui-table-tbody {
79 tr {
80 &:hover {
1fd3ef3f 81 background-color: var(--submenuColor) !important;
bbe0f064 82
28e0e40d
C
83 .action-cell {
84 .dropdown-root,
85 my-edit-button,
86 my-delete-button,
87 my-button {
165ee292 88 display: inline-block !important;
28e0e40d 89 }
bbe0f064
C
90 }
91 }
92
276d9652
C
93 td {
94 border: none !important;
95 }
96
bbe0f064
C
97 &:first-child td {
98 border-top: none !important;
99 }
100
101 &:last-child td {
102 border-bottom: none !important;
103 }
104 }
105
106 .expander {
107 cursor: pointer;
108 position: relative;
109 top: 1px;
110 }
111 }
112
113 th {
114 border: none !important;
b9fcfb1d
C
115 border-bottom: 1px solid !important;
116 border-color: var(--submenuColor) !important;
bbe0f064
C
117 text-align: left !important;
118 padding: 5px 0 5px 15px !important;
119 font-weight: $font-semibold !important;
1fd3ef3f 120 color: var(--mainForegroundColor) !important;
bbe0f064
C
121
122 &.ui-sortable-column:hover {
1fd3ef3f 123 background-color: var(--submenuColor) !important;
b9fcfb1d
C
124 border: 1px solid !important;
125 border-color: var(--submenuColor) !important;
bbe0f064
C
126 border-width: 0 1px !important;
127
128 &:first-child {
129 border-width: 0 1px 0 0 !important;
130 }
131 }
132
133 &.ui-state-highlight {
276d9652 134 background-color: var(--submenuColor) !important;
bbe0f064
C
135
136 .pi {
137 @extend .glyphicon;
138
276d9652
C
139 color: #000 !important;
140 font-size: 11px !important;
141 top: 0 !important;
bbe0f064 142
619443a3 143 &.pi-sort-amount-up-alt {
bbe0f064 144 @extend .glyphicon-triangle-top;
f2fab901
C
145
146 color: var(--mainForegroundColor) !important;
bbe0f064
C
147 }
148
619443a3 149 &.pi-sort-amount-down {
bbe0f064 150 @extend .glyphicon-triangle-bottom;
f2fab901
C
151
152 color: var(--mainForegroundColor) !important;
bbe0f064
C
153 }
154 }
155 }
156 }
157
158 .action-cell {
159 width: 250px !important;
160 padding: 0 !important;
161 text-align: center;
162
28e0e40d
C
163 .dropdown-root,
164 my-edit-button,
165 my-delete-button,
166 my-button {
c5a1ae50 167 display: none !important;
165ee292 168 margin-left: 5px;
c5a1ae50
C
169
170 &.show {
165ee292 171 display: inline-block !important;
c5a1ae50 172 }
c5a1ae50 173
165ee292
K
174 // keep displaying on touchscreen
175 @media not all and (hover: hover) and (pointer: fine) {
176 display: inline-block !important;
177 }
178
179 :first-child {
180 margin-left: 0
181 }
bbe0f064
C
182 }
183 }
184
185 p-paginator {
186 .ui-paginator-bottom {
1fd3ef3f 187 background-color: var(--mainBackgroundColor) !important;
bbe0f064 188 position: relative;
8b183196
RK
189 border: none;
190 border-top: 1px solid !important;
b9fcfb1d 191 border-color: var(--submenuColor) !important;
bbe0f064
C
192 height: 40px;
193 display: flex;
194 justify-content: center;
195 align-items: center;
196
2bc9bd08
RK
197 .ui-dropdown {
198 position: absolute;
9b4241e3 199 top: 3px;
2bc9bd08 200 left: 0;
9b4241e3
RK
201
202 &.ui-state-focus {
203 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
204 }
205
206 .ui-dropdown-label {
207 color: var(--inputPlaceholderColor);
208 }
2bc9bd08
RK
209 }
210
211 .ui-paginator-current {
212 position: absolute;
213 right: 0;
9b4241e3 214 color: var(--inputPlaceholderColor);
2bc9bd08
RK
215 }
216
30eac84e
C
217 .ui-paginator-first,
218 .ui-paginator-prev,
219 .ui-paginator-next,
220 .ui-paginator-last {
221 @include glyphicon-light;
222 padding: 5px 2px;
223 height: auto;
224 outline: none;
225 font-size: 13px;
226 top: -1px;
227
2bc9bd08
RK
228 &.focus-within,
229 &:focus {
230 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
231 }
232
30eac84e
C
233 &.ui-state-disabled:hover {
234 background-color: #fff !important;
235 }
236
237 &.ui-paginator-first {
238 @extend .glyphicon-step-backward;
239 }
240
241 &.ui-paginator-prev {
242 @extend .glyphicon-chevron-left;
243
244 margin-right: 10px;
245 }
246
247 &.ui-paginator-next {
248 @extend .glyphicon-chevron-right;
249
250 margin-left: 10px;
251 }
252
253 &.ui-paginator-last {
254 @extend .glyphicon-step-forward;
255 }
256 }
257
bbe0f064
C
258 .ui-paginator-pages {
259 height: auto !important;
260
2bc9bd08
RK
261 .ui-paginator-page {
262 &.focus-within,
263 &:focus {
264 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest) !important;
165ee292 265 }
2bc9bd08
RK
266 }
267
bbe0f064 268 a {
aa879092 269 color: var(--mainForegroundColor) !important;
bbe0f064 270 font-weight: $font-semibold !important;
276d9652 271 margin: 0 5px !important;
bbe0f064
C
272 outline: 0 !important;
273 border-radius: 3px !important;
274 padding: 5px 2px !important;
275 height: auto !important;
276d9652 276 line-height: initial !important;
bbe0f064
C
277
278 &.ui-state-active {
279 &, &:hover, &:active, &:focus {
280 color: #fff !important;
9a0fc840 281 background-color: var(--mainColor) !important;
bbe0f064
C
282 }
283 }
284 }
285 }
286 }
287 }
288}
289
165ee292 290// overflow data table
c2a89b70 291@mixin overflow-datatable ($table-min-width, $horizontal-margins, $mobile-paginator: true) {
165ee292
K
292 p-table {
293 .ui-table-wrapper {
294 overflow-x: auto;
295 max-width: calc(100vw - #{$horizontal-margins * 2});
296
297 table {
298 min-width: $table-min-width;
299 }
300 }
301
c2a89b70
RK
302 @if $mobile-paginator {
303 p-paginator .ui-paginator-bottom {
165ee292 304 display: block;
619443a3 305
c2a89b70
RK
306 .ui-paginator-current {
307 position: relative;
308 display: block;
309 }
619443a3 310
c2a89b70
RK
311 a, .ui-paginator-pages {
312 vertical-align: middle;
313 }
165ee292
K
314 }
315 }
316 }
317}
318
3caf77d3
C
319// multiselect customizations
320p-multiselect {
6a4c30de
RK
321 .ui-multiselect {
322 border-color: #C6C6C6;
323
324 &:not(.ui-state-disabled) {
325 &:hover {
326 border-color: #C6C6C6;
327 }
328
329 &:focus,
330 &.ui-state-focus {
331 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest);
332 }
333 }
334 }
335
3caf77d3
C
336 .ui-multiselect-label {
337 font-size: 15px !important;
338 padding: 4px 30px 4px 12px !important;
339
340 $width: 338px;
341 width: $width !important;
342
343 @media screen and (max-width: $width) {
344 width: 100% !important;
345 }
346 }
347
619443a3 348 .pi.pi-chevron-down {
3caf77d3
C
349 margin-left: 0 !important;
350
351 &::after {
352 @include select-arrow-down;
353
354 right: 0;
355 margin-top: 6px;
356 }
357 }
358
359 .ui-chkbox-icon {
360 //position: absolute !important;
361 width: 18px;
362 height: 18px;
363 //left: 0;
364
365 //&::after {
366 // left: -2px !important;
367 //}
368 }
d3217560
RK
369
370 .ui-multiselect-panel .ui-multiselect-items .ui-multiselect-item.ui-state-highlight {
371 background-color: var(--mainColorLighter);
372 }
373
374 .ui-inputtext:enabled:focus:not(.ui-state-error) {
375 border-color: var(--mainColorLighter) !important;
376 box-shadow: none;
377 }
3caf77d3
C
378}
379
bbe0f064
C
380// PrimeNG calendar tweaks
381p-calendar .ui-datepicker {
382 a {
383 @include disable-default-a-behaviour;
384 }
385
386 .ui-datepicker-header {
387
388 .ui-datepicker-year {
389 margin-left: 5px;
390 }
391
392 .ui-datepicker-next {
393 @extend .glyphicon-chevron-right;
394 @include glyphicon-light;
276d9652 395
aa879092 396 color: #000 !important;
276d9652
C
397 text-align: right;
398
399 .pi.pi-chevron-right {
400 display: none !important;
401 }
bbe0f064
C
402 }
403
404 .ui-datepicker-prev {
405 @extend .glyphicon-chevron-left;
406 @include glyphicon-light;
276d9652 407
aa879092 408 color: #000 !important;
276d9652
C
409 text-align: left;
410
411 .pi.pi-chevron-left {
412 display: none !important;
413 }
bbe0f064
C
414 }
415 }
416
417 .ui-timepicker {
418
419 .pi.pi-chevron-up {
420 @extend .glyphicon-chevron-up;
421 @include glyphicon-light;
aa879092
C
422
423 color: #000 !important;
bbe0f064
C
424 }
425
426 .pi.pi-chevron-down {
427 @extend .glyphicon-chevron-down;
428 @include glyphicon-light;
aa879092
C
429
430 color: #000 !important;
bbe0f064
C
431 }
432 }
791645e6
C
433}
434
46db9430
RK
435p-tablecheckbox:hover div .ui-chkbox-box {
436 box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
437}
438
17bb716b 439.ui-chkbox {
276d9652 440
17bb716b
C
441 &, .ui-chkbox-box {
442 width: 18px !important;
443 height: 18px !important;
791645e6
C
444 }
445
17bb716b
C
446 .ui-chkbox-box {
447 &.ui-state-active {
448 border-color: var(--mainColor) !important;
449 background-color: var(--mainColor) !important;
791645e6
C
450 }
451
17bb716b
C
452 .ui-chkbox-icon {
453 position: relative;
454 overflow: visible !important;
455
456 &:after {
457 content: '';
458 position: absolute;
459 top: 1px;
460 left: 6px;
461 width: 5px;
462 height: 12px;
463 opacity: 0;
464 transform: rotate(45deg) scale(0);
465 border-right: 2px solid var(--mainBackgroundColor);
466 border-bottom: 2px solid var(--mainBackgroundColor);
467 }
468
469 &.pi-check:after {
470 opacity: 1;
471 transform: rotate(45deg) scale(1);
472 }
791645e6
C
473 }
474 }
276d9652
C
475}
476
477p-inputswitch {
9b82d49d
RK
478 height: 26px;
479
276d9652
C
480 .ui-inputswitch-checked .ui-inputswitch-slider {
481 background-color: var(--mainColor) !important;
482 }
d3217560
RK
483
484 &.small {
485 height: 20px;
486
487 .ui-inputswitch {
488 width: 2.5em !important;
489 height: 1.45em !important;
490
491 .ui-inputswitch-slider::before {
492 height: 1em !important;
493 width: 1em !important;
494 }
495 }
496
497 .ui-inputswitch-checked .ui-inputswitch-slider::before {
498 transform: translateX(1em) !important;
499 }
500 }
276d9652 501}
f8b2c1b4
C
502
503p-toast {
3195cd1c 504 .ui-toast {
36f2981f 505 z-index: z(notification) !important;
3195cd1c 506
21973012
RK
507 .ui-toast-close-icon {
508 font-family: "Glyphicons Halflings";
509 opacity: 0;
75264e37 510
21973012
RK
511 &:after {
512 content: "\e014";
513 }
75264e37
RK
514 }
515
21973012
RK
516 &:hover .ui-toast-close-icon {
517 opacity: .3;
75264e37
RK
518 }
519 }
520
f8b2c1b4
C
521 .ui-toast-message {
522 font-family: $main-fonts;
28c801b6 523 background-color: var(--mainBackgroundColor) !important;
efc84bdc 524 color: var(--mainForegroundColor) !important;
28c801b6
RK
525 border-radius: 5px;
526 box-sizing: border-box;
527 border: 1px solid #EBEEF5 !important;
528 box-shadow: 0 2px 12px 0 rgba(0, 0 , 0, .1);
529 overflow: hidden;
530
531 &.ui-toast-message-success .glyphicon {
532 color: #8BC34A !important;
f8b2c1b4
C
533 }
534
28c801b6
RK
535 &.ui-toast-message-error .glyphicon {
536 color: #F44336 !important;
f8b2c1b4
C
537 }
538
28c801b6
RK
539 &.ui-toast-message-warn .glyphicon {
540 color: #F1680D !important;
f8b2c1b4
C
541 }
542
28c801b6
RK
543 &.ui-toast-message-info .glyphicon {
544 color: #03A9F4 !important;
f8b2c1b4
C
545 }
546
4707f410
C
547 .notification-block {
548 display: flex;
2f1548fd
C
549 align-items: center;
550 padding: 5px;
f8b2c1b4 551
4707f410 552 .message {
6e7e63b8
C
553 flex-grow: 1;
554
4707f410
C
555 h3 {
556 font-size: 21px;
557 }
f8b2c1b4 558
4707f410
C
559 p {
560 font-size: 15px;
2f1548fd 561 margin-bottom: 0;
4707f410 562 }
f8b2c1b4 563 }
f8b2c1b4 564
4707f410
C
565 .glyphicon {
566 font-size: 32px;
4707f410
C
567 margin-right: 5px;
568 }
f8b2c1b4
C
569 }
570 }
571}
17bb716b
C
572
573.ui-widget {
574 font-family: $main-fonts !important;
575}