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