UNPKG

5.47 kBSCSSView Raw
1.ngx-datatable {
2 display: block;
3 overflow: hidden;
4 justify-content: center;
5 position: relative;
6 transform: translate3d(0, 0, 0);
7
8 [hidden] {
9 display: none !important;
10 }
11
12 *,
13 *:before,
14 *:after {
15 -moz-box-sizing: border-box;
16 -webkit-box-sizing: border-box;
17 box-sizing: border-box;
18 }
19
20 /**
21 * Vertical Scrolling Adjustments
22 */
23 &.scroll-vertical {
24 .datatable-body {
25 overflow-y: auto;
26 }
27 &.virtualized {
28 .datatable-body {
29 .datatable-row-wrapper {
30 position: absolute;
31 }
32 }
33 }
34 }
35
36 /**
37 * Horizontal Scrolling Adjustments
38 */
39 &.scroll-horz {
40 .datatable-body {
41 overflow-x: auto;
42 -webkit-overflow-scrolling: touch;
43 }
44 }
45
46 /**
47 * Fixed Header Height Adjustments
48 */
49 &.fixed-header {
50 .datatable-header {
51 .datatable-header-inner {
52 white-space: nowrap;
53 .datatable-header-cell {
54 white-space: nowrap;
55 overflow: hidden;
56 text-overflow: ellipsis;
57 }
58 }
59 }
60 }
61
62 /**
63 * Fixed row height adjustments
64 */
65 &.fixed-row {
66 .datatable-scroll {
67 white-space: nowrap;
68
69 .datatable-body-row {
70 white-space: nowrap;
71
72 .datatable-body-cell {
73 overflow: hidden;
74 white-space: nowrap;
75 text-overflow: ellipsis;
76 }
77
78 .datatable-body-group-cell {
79 overflow: hidden;
80 white-space: nowrap;
81 text-overflow: ellipsis;
82 }
83 }
84 }
85 }
86
87 /**
88 * Shared Styles
89 */
90 .datatable-body-row,
91 .datatable-row-center,
92 .datatable-header-inner {
93 display: -webkit-box;
94 display: -moz-box;
95 display: -ms-flexbox;
96 display: -webkit-flex;
97 display: flex;
98
99 flex-direction: row;
100 -webkit-flex-flow: row;
101 -moz-flex-flow: row;
102 -ms-flex-flow: row;
103 -o-flex-flow: row;
104 flex-flow: row;
105 }
106
107 .datatable-body-cell,
108 .datatable-header-cell {
109 overflow-x: hidden;
110 vertical-align: top;
111 display: inline-block;
112 line-height: 1.625;
113
114 &:focus {
115 outline: none;
116 }
117 }
118
119 .datatable-row-left,
120 .datatable-row-right {
121 z-index: 9;
122 }
123
124 .datatable-row-left,
125 .datatable-row-center,
126 .datatable-row-group,
127 .datatable-row-right {
128 position: relative;
129 }
130
131 /**
132 * Header Styles
133 */
134 .datatable-header {
135 display: block;
136 overflow: hidden;
137
138 .datatable-header-inner {
139 align-items: stretch;
140 -webkit-align-items: stretch;
141 }
142
143 .datatable-header-cell {
144 position: relative;
145 display: inline-block;
146
147 &.sortable {
148 .datatable-header-cell-wrapper {
149 cursor: pointer;
150 }
151 }
152
153 &.longpress .datatable-header-cell-wrapper {
154 cursor: move;
155 }
156
157 .sort-btn {
158 line-height: 100%;
159 vertical-align: middle;
160 display: inline-block;
161 cursor: pointer;
162 }
163
164 .resize-handle,
165 .resize-handle--not-resizable {
166 display: inline-block;
167 position: absolute;
168 right: 0;
169 top: 0;
170 bottom: 0;
171 width: 5px;
172 padding: 0 4px;
173 visibility: hidden;
174 }
175
176 .resize-handle {
177 cursor: ew-resize;
178 }
179
180 &.resizeable:hover {
181 .resize-handle {
182 visibility: visible;
183 }
184 }
185
186 &:hover {
187 .resize-handle--not-resizable {
188 visibility: visible;
189 }
190 }
191
192 .targetMarker {
193 position: absolute;
194 top: 0;
195 bottom: 0;
196
197 &.dragFromLeft {
198 right: 0;
199 }
200
201 &.dragFromRight {
202 left: 0;
203 }
204 }
205
206 .datatable-header-cell-template-wrap {
207 height: inherit;
208 }
209 }
210 }
211
212 /**
213 * Body Styles
214 */
215 .datatable-body {
216 position: relative;
217 z-index: 10;
218 display: block;
219
220 .datatable-scroll {
221 display: inline-block;
222 }
223
224 .datatable-row-detail {
225 overflow-y: hidden;
226 }
227
228 .datatable-row-wrapper {
229 display: -webkit-box;
230 display: -moz-box;
231 display: -ms-flexbox;
232 display: -webkit-flex;
233 display: flex;
234
235 -webkit-box-orient: vertical;
236 -webkit-box-direction: normal;
237 -webkit-flex-direction: column;
238 -moz-box-orient: vertical;
239 -moz-box-direction: normal;
240 -ms-flex-direction: column;
241 flex-direction: column;
242 }
243
244 .datatable-body-row {
245 outline: none;
246
247 > div {
248 display: -webkit-box;
249 display: -moz-box;
250 display: -ms-flexbox;
251 display: -webkit-flex;
252 display: flex;
253 }
254 }
255 }
256
257 /**
258 * Footer Styles
259 */
260 .datatable-footer {
261 display: block;
262 width: 100%;
263 overflow: auto;
264
265 .datatable-footer-inner {
266 display: flex;
267 align-items: center;
268 width: 100%;
269 }
270
271 .selected-count {
272 .page-count {
273 flex: 1 1 40%;
274 }
275 .datatable-pager {
276 flex: 1 1 60%;
277 }
278 }
279
280 .page-count {
281 flex: 1 1 20%;
282 }
283
284 .datatable-pager {
285 flex: 1 1 80%;
286 text-align: right;
287
288 .pager,
289 .pager li {
290 padding: 0;
291 margin: 0;
292 display: inline-block;
293 list-style: none;
294 }
295
296 .pager {
297 li,
298 li a {
299 outline: none;
300 }
301
302 li {
303 a {
304 cursor: pointer;
305 display: inline-block;
306 }
307
308 &.disabled a {
309 cursor: not-allowed;
310 }
311 }
312 }
313 }
314 }
315}