d99c5b96a011e0d8ca596dd71b123ffdf39f1d6c
[oweals/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/bootstrap/theme.css';
6
7 @mixin glyphicon-light {
8   font-family: 'Glyphicons Halflings';
9   text-decoration: none !important;
10   color: #000 !important;
11 }
12
13 // data table customizations
14 p-table {
15   font-size: 15px !important;
16
17   td {
18     border: 1px solid #E5E5E5 !important;
19     padding-left: 15px !important;
20
21     &:not(.action-cell) {
22       overflow: hidden !important;
23       text-overflow: ellipsis !important;
24       white-space: nowrap !important;
25     }
26   }
27
28   tr {
29     background-color: var(--mainBackgroundColor) !important;
30     height: 46px;
31   }
32
33   .ui-table-tbody {
34     tr {
35       &:hover {
36         background-color: #f0f0f0 !important;
37       }
38
39       &:not(:hover) {
40         .action-cell * {
41           display: none !important;
42         }
43       }
44
45       &:first-child td {
46         border-top: none !important;
47       }
48
49       &:last-child td {
50         border-bottom: none !important;
51       }
52     }
53
54     .expander {
55       cursor: pointer;
56       position: relative;
57       top: 1px;
58     }
59   }
60
61   th {
62     border: none !important;
63     border-bottom: 1px solid #f0f0f0 !important;
64     text-align: left !important;
65     padding: 5px 0 5px 15px !important;
66     font-weight: $font-semibold !important;
67     color: #000 !important;
68
69     &.ui-sortable-column:hover {
70       background-color: #f0f0f0 !important;
71       border: 1px solid #f0f0f0 !important;
72       border-width: 0 1px !important;
73
74       &:first-child {
75         border-width: 0 1px 0 0 !important;
76       }
77     }
78
79     &.ui-state-highlight {
80       background-color: #fff !important;
81
82       .pi {
83         @extend .glyphicon;
84
85         color: #000;
86         font-size: 11px;
87         top: 0;
88
89         &.pi-sort-up {
90           @extend .glyphicon-triangle-top;
91         }
92
93         &.pi-sort-down {
94           @extend .glyphicon-triangle-bottom;
95         }
96       }
97     }
98   }
99
100   .action-cell {
101     width: 250px !important;
102     padding: 0 !important;
103     text-align: center;
104
105     my-edit-button + my-delete-button {
106       margin-left: 5px;
107     }
108   }
109
110   p-paginator {
111     .ui-paginator-bottom {
112       position: relative;
113       border: 1px solid #f0f0f0 !important;
114       height: 40px;
115       display: flex;
116       justify-content: center;
117       align-items: center;
118
119       .ui-paginator-first,
120       .ui-paginator-prev,
121       .ui-paginator-next,
122       .ui-paginator-last {
123         @include glyphicon-light;
124         padding: 5px 2px;
125         height: auto;
126         outline: none;
127         font-size: 13px;
128         top: -1px;
129
130         &.ui-state-disabled:hover {
131           background-color: #fff !important;
132         }
133
134         &.ui-paginator-first {
135           @extend .glyphicon-step-backward;
136         }
137
138         &.ui-paginator-prev {
139           @extend .glyphicon-chevron-left;
140
141           margin-right: 10px;
142         }
143
144         &.ui-paginator-next {
145           @extend .glyphicon-chevron-right;
146
147           margin-left: 10px;
148         }
149
150         &.ui-paginator-last {
151           @extend .glyphicon-step-forward;
152         }
153       }
154
155       .ui-paginator-pages {
156         height: auto !important;
157
158         a {
159           color: #000 !important;
160           font-weight: $font-semibold !important;
161           margin-right: 0 10px !important;
162           outline: 0 !important;
163           border-radius: 3px !important;
164           padding: 5px 2px !important;
165           height: auto !important;
166
167           &.ui-state-active {
168             &, &:hover, &:active, &:focus {
169               color: #fff !important;
170               background-color: var(--mainColor) !important;
171             }
172           }
173         }
174       }
175     }
176   }
177 }
178
179 // PrimeNG calendar tweaks
180 p-calendar .ui-datepicker {
181   a {
182     @include disable-default-a-behaviour;
183   }
184
185   .ui-datepicker-header {
186
187     .ui-datepicker-year {
188       margin-left: 5px;
189     }
190
191     .ui-datepicker-next {
192       @extend .glyphicon-chevron-right;
193       @include glyphicon-light;
194     }
195
196     .ui-datepicker-prev {
197       @extend .glyphicon-chevron-left;
198       @include glyphicon-light;
199     }
200   }
201
202   .ui-timepicker {
203
204     .pi.pi-chevron-up {
205       @extend .glyphicon-chevron-up;
206       @include glyphicon-light;
207     }
208
209     .pi.pi-chevron-down {
210       @extend .glyphicon-chevron-down;
211       @include glyphicon-light;
212     }
213   }
214 }