@@ -24,7 +24,6 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
24
24
25
25
.hds-table {
26
26
width : 100% ;
27
- border : $hds-table-border-width solid $hds-table-border-color ;
28
27
border-radius : $hds-table-border-radius ;
29
28
border-spacing : 0 ;
30
29
}
@@ -36,6 +35,13 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
36
35
table-layout : fixed ;
37
36
}
38
37
38
+ // table border
39
+
40
+ .hds-table ,
41
+ .hds-table__th ,
42
+ .hds-table__td {
43
+ border : calc (#{$hds-table-border-width } / 2 ) solid $hds-table-border-color ;
44
+ }
39
45
40
46
// ----------------------------------------------------------------
41
47
@@ -47,26 +53,8 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
47
53
background-color : var (--token-color-surface-strong );
48
54
49
55
.hds-table__th {
50
- position : relative ;
51
56
padding : $hds-table-cell-padding-medium ;
52
57
text-align : left ;
53
- border-top : none ;
54
- border-right : none ;
55
- border-bottom : $hds-table-border-width solid $hds-table-border-color ;
56
- border-left : none ;
57
-
58
- // border between two cells (we emulate a cell border slightly detached from the top/bottom borders)
59
-
60
- + .hds-table__th ::before {
61
- position : absolute ;
62
- top : 6px ;
63
- bottom : 6px ;
64
- left : -1px ; // we need to offset the border by 1px to render a right border of the previous cell
65
- width : 1px ;
66
- background-color : $hds-table-border-color ;
67
- content : " " ;
68
- pointer-events : none ;
69
- }
70
58
}
71
59
72
60
// horizontal alignment
@@ -187,11 +175,6 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
187
175
// border radius: target first th (scope of row) and td, and last td elements in the last row
188
176
189
177
& :last-of-type {
190
- .hds-table__th ,
191
- .hds-table__td {
192
- border-bottom : none ;
193
- }
194
-
195
178
.hds-table__th :first-child ,
196
179
.hds-table__td :first-child {
197
180
border-bottom-left-radius : $hds-table-inner-border-radius ;
@@ -207,10 +190,6 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
207
190
.hds-table__th ,
208
191
.hds-table__td {
209
192
text-align : left ;
210
- border-top : none ;
211
- border-right : none ;
212
- border-bottom : $hds-table-border-width solid $hds-table-border-color ;
213
- border-left : none ;
214
193
215
194
// density
216
195
@@ -225,9 +204,7 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
225
204
.hds-table--density-tall & {
226
205
padding : $hds-table-cell-padding-tall ;
227
206
}
228
-
229
207
}
230
-
231
208
// horizontal alignment
232
209
233
210
.hds-table__th--align-center ,
0 commit comments