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