Skip to content

Commit

Permalink
fix: πŸ› Table Expand Icon size issue (ant-design#26409)
Browse files Browse the repository at this point in the history
* - ant-design#24719
Expand Icon

* - ant-design#24719
Expand Icon

Co-authored-by: Gary Wei <wgz@tip-lab.com>
  • Loading branch information
afc163 and Gary Wei committed Aug 26, 2020
1 parent 453eafe commit e11da52
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,13 @@
float: left;
box-sizing: border-box;

width: ceil(@font-size-sm * 1.4);
height: ceil(@font-size-sm * 1.4);
width: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * 3;
height: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * 3;
padding: 0;
color: inherit;
line-height: @font-size-sm;
vertical-align: floor((@font-size-base - ceil(@font-size-sm * 1.4)) / 2);
line-height: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base *
3;
// vertical-align: floor((@font-size-base - ceil(@font-size-sm * 1.4)) / 2);
background: @table-expand-icon-bg;
border: @border-width-base @border-style-base @border-color-split;
border-radius: @border-radius-base;
Expand All @@ -440,7 +441,7 @@
}

&::before {
top: 7px;
top: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2);
right: 3px;
left: 3px;
height: @border-width-base;
Expand All @@ -449,7 +450,7 @@
&::after {
top: 3px;
bottom: 3px;
left: 7px;
left: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2);
width: @border-width-base;
transform: rotate(90deg);
}
Expand All @@ -474,7 +475,8 @@
}

.@{table-prefix-cls}-row-indent + & {
margin-top: (@font-size-base * @line-height-base - ceil(@font-size-sm * 1.4)) / 2;
margin-top: (@font-size-base * @line-height-base - @border-width-base * 3) / 2 -
ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2);
margin-right: @padding-xs;
}
}
Expand Down

0 comments on commit e11da52

Please sign in to comment.