_table.scss
2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.ui-table {
background-color: var(--ui-BG);
max-width: 100%;
display: table;
&.table-full {
width: 100%;
}
&.table-radius {
border-radius: $radius;
.ui-table-header {
.ui-table-tr {
border-top-left-radius: $radius;
border-top-right-radius: $radius;
}
.ui-table-th {
&:first-child {
border-top-left-radius: $radius;
}
&:last-child {
border-top-right-radius: $radius;
}
}
}
}
.ui-table-header {
display: table-header-group;
.ui-table-th {
font-weight: bold;
border-bottom: 1px solid var(--ui-Border);
white-space: nowrap;
padding: 1em 0.8em;
}
}
.ui-table-tr {
display: table-row;
z-index: 1;
}
.ui-table-body {
display: table-row-group;
position: relative;
.ui-table-tr:hover {
background-color: var(--ui-BG-1) !important;
}
.ui-table-loading {
min-height: 300px;
position: absolute !important;
width: 100%;
height: 100%;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--ui-Border);
}
}
.ui-table-td,
.ui-table-th {
display: table-cell;
text-align: unset;
padding: 0.5em 0.8em;
// font-size: 90%;
vertical-align: middle;
}
}
.ui-table.table-border {
&,
& .ui-table-td,
& .ui-table-th {
position: relative;
&::after {
content: ' ';
width: 200%;
height: 200%;
position: absolute;
top: 0;
left: 0;
border-radius: inherit;
transform: scale(0.5);
transform-origin: 0 0;
pointer-events: none;
box-sizing: border-box;
border: 1px solid var(--ui-Border);
z-index: 1;
}
}
.ui-table-td,
.ui-table-th {
&::after {
border-width: 1px 1px 0 0;
}
&:last-child::after {
border-right: none;
}
}
}
.ui-table.table-radius {
&::after {
border-radius: calc(#{$radius} * 2);
}
& .ui-table-tr .ui-table-th:first-child {
border-top-left-radius: calc(#{$radius} * 2);
}
& .ui-table-tr .ui-table-th:last-child {
border-top-right-radius: calc(#{$radius} * 2);
}
& .ui-table-tr:last-child .ui-table-td:first-child {
border-bottom-left-radius: #{$radius};
}
& .ui-table-tr:last-child .ui-table-td:last-child {
border-bottom-right-radius: #{$radius};
}
}
.ui-table.table-striped > .ui-table-body > .ui-table-tr:nth-child(2n + 1),
.ui-table.table-striped > .ui-table-body > .ui-table-tr:nth-child(2n + 1) {
background-color: var(--ui-BG-1);
}
.table-responsive {
width: inherit;
height: 100%;
max-width: 100%;
overflow: hidden;
box-sizing: border-box;
.table-responsive-box {
position: relative;
overflow: hidden;
}
}