fix: class names of Row and Col components when using custom prefix (#33969)

This commit is contained in:
mic-web 2022-02-10 04:13:25 +01:00 committed by GitHub
parent d4ad8ce59d
commit 4f8646f957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,11 @@
@import '../../style/mixins/index';
@import './mixin';
@row-prefix-cls: ~'@{ant-prefix}-row';
@col-prefix-cls: ~'@{ant-prefix}-col';
// Grid system
.@{ant-prefix}-row {
.@{row-prefix-cls} {
display: flex;
flex-flow: row wrap;
@ -19,46 +22,46 @@
}
// x轴原点
.@{ant-prefix}-row-start {
.@{row-prefix-cls}-start {
justify-content: flex-start;
}
// x轴居中
.@{ant-prefix}-row-center {
.@{row-prefix-cls}-center {
justify-content: center;
}
// x轴反方向
.@{ant-prefix}-row-end {
.@{row-prefix-cls}-end {
justify-content: flex-end;
}
// x轴平分
.@{ant-prefix}-row-space-between {
.@{row-prefix-cls}-space-between {
justify-content: space-between;
}
// x轴有间隔地平分
.@{ant-prefix}-row-space-around {
.@{row-prefix-cls}-space-around {
justify-content: space-around;
}
// 顶部对齐
.@{ant-prefix}-row-top {
.@{row-prefix-cls}-top {
align-items: flex-start;
}
// 居中对齐
.@{ant-prefix}-row-middle {
.@{row-prefix-cls}-middle {
align-items: center;
}
// 底部对齐
.@{ant-prefix}-row-bottom {
.@{row-prefix-cls}-bottom {
align-items: flex-end;
}
.@{ant-prefix}-col {
.@{col-prefix-cls} {
position: relative;
max-width: 100%;
// Prevent columns from collapsing when empty