refactor: replace float with flex of Card (#35236)

This commit is contained in:
miracles1919 2022-04-26 20:35:25 +08:00 committed by GitHub
parent 40379a3e40
commit 444ce6d384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,6 @@
}
&-extra {
float: right;
// https://stackoverflow.com/a/22429853/3040605
margin-left: auto;
padding: @card-head-padding 0;
@ -99,13 +98,17 @@
.clearfix();
}
&-contain-grid &-body {
display: flex;
flex-wrap: wrap;
}
&-contain-grid:not(&-loading) &-body {
margin: -1px 0 0 -1px;
padding: 0;
}
&-grid {
float: left;
width: 33.33%;
padding: @card-padding-base;
border: 0;
@ -115,10 +118,6 @@
0 1px 0 0 @border-color-split inset;
transition: all 0.3s;
.@{card-prefix-cls}-rtl & {
float: right;
}
&-hoverable {
&:hover {
position: relative;
@ -155,6 +154,7 @@
}
&-actions {
display: flex;
margin: 0;
padding: 0;
list-style: none;
@ -163,15 +163,10 @@
.clearfix();
& > li {
float: left;
margin: @card-actions-li-margin;
color: @text-color-secondary;
text-align: center;
.@{card-prefix-cls}-rtl & {
float: right;
}
> span {
position: relative;
display: block;
@ -234,15 +229,14 @@
}
&-meta {
display: flex;
margin: -4px 0;
.clearfix();
&-avatar {
float: left;
padding-right: 16px;
.@{card-prefix-cls}-rtl & {
float: right;
padding-right: 0;
padding-left: 16px;
}