fix: restrict nested table styles to only apply to direct children of td (#26568)

Co-authored-by: William Cai <williamcai@easyops.cn>
This commit is contained in:
willc001 2020-09-06 13:21:40 +08:00 committed by GitHub
parent bf45c4c1b0
commit 79b681d27c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,23 @@
> td { > td {
border-bottom: @border-width-base @border-style-base @border-color-split; border-bottom: @border-width-base @border-style-base @border-color-split;
transition: background 0.3s; transition: background 0.3s;
// ========================= Nest Table ===========================
> .@{table-prefix-cls}-wrapper:only-child {
.@{table-prefix-cls} {
margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical (@table-padding-horizontal +
ceil(@font-size-sm * 1.4));
&-tbody > tr:last-child > td {
border-bottom: 0;
&:first-child,
&:last-child {
border-radius: 0;
}
}
}
}
} }
&.@{table-prefix-cls}-row:hover { &.@{table-prefix-cls}-row:hover {
@ -126,23 +143,6 @@
} }
} }
} }
// ========================= Nest Table ===========================
.@{table-prefix-cls}-wrapper:only-child {
.@{table-prefix-cls} {
margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical (@table-padding-horizontal +
ceil(@font-size-sm * 1.4));
&-tbody > tr:last-child > td {
border-bottom: 0;
&:first-child,
&:last-child {
border-radius: 0;
}
}
}
}
} }
} }