Skip to content

Commit

Permalink
fix: restrict nested table styles to only apply to direct children of td
Browse files Browse the repository at this point in the history
  • Loading branch information
willc001 committed Sep 3, 2020
1 parent 6d28542 commit 2b75a65
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,23 @@
> td {
border-bottom: @border-width-base @border-style-base @border-color-split;
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 {
Expand All @@ -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;
}
}
}
}
}
}

Expand Down

0 comments on commit 2b75a65

Please sign in to comment.