]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/sass/primeng-custom.scss
Fix some styles
[github/Chocobozzz/PeerTube.git] / client / src / sass / primeng-custom.scss
1 @import '_variables';
2 @import '_mixins';
3
4 @import '~primeng/resources/primeng.css';
5 @import '~primeng/resources/themes/nova-light/theme.css';
6
7 @mixin glyphicon-light {
8 font-family: 'Glyphicons Halflings';
9 text-decoration: none !important;
10 color: var(--mainForegroundColor) !important;
11 }
12
13 // data table customizations
14 p-table {
15 .ui-table-caption {
16 border: none !important;
17 background-color: #fff !important;
18
19 .caption {
20 height: 40px;
21 display: flex;
22 align-items: center;
23 }
24 }
25
26 th {
27 background-color: #fff !important;
28 outline: 0;
29 }
30
31 td, th {
32 font-family: $main-fonts;
33 font-size: 15px !important;
34 color: var(--mainForegroundColor) !important;
35 }
36
37 td {
38 padding-left: 15px !important;
39
40 &:not(.action-cell) {
41 overflow: hidden !important;
42 text-overflow: ellipsis !important;
43 white-space: nowrap !important;
44 }
45 }
46
47 tr {
48 outline: 0;
49 background-color: var(--mainBackgroundColor) !important;
50 height: 46px;
51
52 &.ui-state-highlight {
53 background-color: var(--submenuColor) !important;
54
55 td, td > a {
56 color: var(--mainForegroundColor) !important;
57 }
58 }
59 }
60
61 .ui-table-tbody {
62 tr {
63 &:hover {
64 background-color: var(--submenuColor) !important;
65 }
66
67 &:not(:hover) {
68 .action-cell * {
69 display: none !important;
70 }
71 }
72
73 td {
74 border: none !important;
75 }
76
77 &:first-child td {
78 border-top: none !important;
79 }
80
81 &:last-child td {
82 border-bottom: none !important;
83 }
84 }
85
86 .expander {
87 cursor: pointer;
88 position: relative;
89 top: 1px;
90 }
91 }
92
93 th {
94 border: none !important;
95 border-bottom: 1px solid !important;
96 border-color: var(--submenuColor) !important;
97 text-align: left !important;
98 padding: 5px 0 5px 15px !important;
99 font-weight: $font-semibold !important;
100 color: var(--mainForegroundColor) !important;
101
102 &.ui-sortable-column:hover {
103 background-color: var(--submenuColor) !important;
104 border: 1px solid !important;
105 border-color: var(--submenuColor) !important;
106 border-width: 0 1px !important;
107
108 &:first-child {
109 border-width: 0 1px 0 0 !important;
110 }
111 }
112
113 &.ui-state-highlight {
114 background-color: var(--submenuColor) !important;
115
116 .pi {
117 @extend .glyphicon;
118
119 color: #000 !important;
120 font-size: 11px !important;
121 top: 0 !important;
122
123 &.pi-sort-up {
124 @extend .glyphicon-triangle-top;
125 }
126
127 &.pi-sort-down {
128 @extend .glyphicon-triangle-bottom;
129 }
130 }
131 }
132 }
133
134 .action-cell {
135 width: 250px !important;
136 padding: 0 !important;
137 text-align: center;
138
139 my-edit-button + my-delete-button {
140 margin-left: 5px;
141 }
142 }
143
144 p-paginator {
145 .ui-paginator-bottom {
146 background-color: var(--mainBackgroundColor) !important;
147 position: relative;
148 border: none;
149 border-top: 1px solid !important;
150 border-color: var(--submenuColor) !important;
151 height: 40px;
152 display: flex;
153 justify-content: center;
154 align-items: center;
155
156 .ui-paginator-first,
157 .ui-paginator-prev,
158 .ui-paginator-next,
159 .ui-paginator-last {
160 @include glyphicon-light;
161 padding: 5px 2px;
162 height: auto;
163 outline: none;
164 font-size: 13px;
165 top: -1px;
166
167 &.ui-state-disabled:hover {
168 background-color: #fff !important;
169 }
170
171 &.ui-paginator-first {
172 @extend .glyphicon-step-backward;
173 }
174
175 &.ui-paginator-prev {
176 @extend .glyphicon-chevron-left;
177
178 margin-right: 10px;
179 }
180
181 &.ui-paginator-next {
182 @extend .glyphicon-chevron-right;
183
184 margin-left: 10px;
185 }
186
187 &.ui-paginator-last {
188 @extend .glyphicon-step-forward;
189 }
190 }
191
192 .ui-paginator-pages {
193 height: auto !important;
194
195 a {
196 color: #000 !important;
197 font-weight: $font-semibold !important;
198 margin: 0 5px !important;
199 outline: 0 !important;
200 border-radius: 3px !important;
201 padding: 5px 2px !important;
202 height: auto !important;
203 line-height: initial !important;
204
205 &.ui-state-active {
206 &, &:hover, &:active, &:focus {
207 color: #fff !important;
208 background-color: var(--mainColor) !important;
209 }
210 }
211 }
212 }
213 }
214 }
215 }
216
217 // PrimeNG calendar tweaks
218 p-calendar .ui-datepicker {
219 a {
220 @include disable-default-a-behaviour;
221 }
222
223 .ui-datepicker-header {
224
225 .ui-datepicker-year {
226 margin-left: 5px;
227 }
228
229 .ui-datepicker-next {
230 @extend .glyphicon-chevron-right;
231 @include glyphicon-light;
232
233 text-align: right;
234
235 .pi.pi-chevron-right {
236 display: none !important;
237 }
238 }
239
240 .ui-datepicker-prev {
241 @extend .glyphicon-chevron-left;
242 @include glyphicon-light;
243
244 text-align: left;
245
246 .pi.pi-chevron-left {
247 display: none !important;
248 }
249 }
250 }
251
252 .ui-timepicker {
253
254 .pi.pi-chevron-up {
255 @extend .glyphicon-chevron-up;
256 @include glyphicon-light;
257 }
258
259 .pi.pi-chevron-down {
260 @extend .glyphicon-chevron-down;
261 @include glyphicon-light;
262 }
263 }
264 }
265
266 .ui-chkbox {
267
268 &, .ui-chkbox-box {
269 width: 18px !important;
270 height: 18px !important;
271 }
272
273 .ui-chkbox-box {
274 &.ui-state-active {
275 border-color: var(--mainColor) !important;
276 background-color: var(--mainColor) !important;
277 }
278
279 .ui-chkbox-icon {
280 position: relative;
281 overflow: visible !important;
282
283 &:after {
284 content: '';
285 position: absolute;
286 top: 1px;
287 left: 6px;
288 width: 5px;
289 height: 12px;
290 opacity: 0;
291 transform: rotate(45deg) scale(0);
292 border-right: 2px solid var(--mainBackgroundColor);
293 border-bottom: 2px solid var(--mainBackgroundColor);
294 }
295
296 &.pi-check:after {
297 opacity: 1;
298 transform: rotate(45deg) scale(1);
299 }
300 }
301 }
302 }
303
304 p-inputswitch {
305 .ui-inputswitch-checked .ui-inputswitch-slider {
306 background-color: var(--mainColor) !important;
307 }
308 }
309
310 p-toast {
311 .ui-toast {
312 // Modal is 10005
313 z-index: 10010 !important;
314 }
315
316 .ui-toast-message {
317 font-family: $main-fonts;
318
319 &.ui-toast-message-success {
320 color: #fff !important;
321 background-color: #8BC34A !important;
322 }
323
324 &.ui-toast-message-error {
325 color: #fff !important;
326 background-color: #F44336 !important;
327 }
328
329 &.ui-toast-message-info {
330 color: #fff !important;
331 background-color: #03A9F4 !important;
332 }
333
334 &.ui-toast-message-info {
335 color: #fff !important;
336 background-color: #03A9F4 !important;
337 }
338
339 .notification-block {
340 display: flex;
341 align-items: center;
342 padding: 5px;
343
344 .message {
345 flex-grow: 1;
346
347 h3 {
348 font-size: 21px;
349 }
350
351 p {
352 font-size: 15px;
353 margin-bottom: 0;
354 }
355 }
356
357 .glyphicon {
358 font-size: 32px;
359 margin-right: 5px;
360 }
361 }
362 }
363 }
364
365 .ui-widget {
366 font-family: $main-fonts !important;
367 }