mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
7f7b3a59dc
* fix: col-x class names of Row and Col components when using custom prefix * refactor: reuse @col-prefix-cls and @row-prefix-cls * refactor: move @col-prefix-cls and @row-prefix-cls to mixin.less
70 lines
1.4 KiB
Plaintext
70 lines
1.4 KiB
Plaintext
@import '../../style/themes/index';
|
|
@import '../../style/mixins/index';
|
|
@import './mixin';
|
|
|
|
.@{row-prefix-cls} {
|
|
&-rtl {
|
|
direction: rtl;
|
|
}
|
|
}
|
|
|
|
// mixin
|
|
.loop-grid-columns(@index, @class) when (@index > 0) {
|
|
.@{col-prefix-cls}@{class}-push-@{index} {
|
|
// reset property in RTL direction
|
|
&.@{col-prefix-cls}-rtl {
|
|
right: percentage((@index / @grid-columns));
|
|
left: auto;
|
|
}
|
|
}
|
|
|
|
.@{col-prefix-cls}@{class}-pull-@{index} {
|
|
// reset property in RTL direction
|
|
&.@{col-prefix-cls}-rtl {
|
|
right: auto;
|
|
left: percentage((@index / @grid-columns));
|
|
}
|
|
}
|
|
|
|
.@{col-prefix-cls}@{class}-offset-@{index} {
|
|
// reset property in RTL direction
|
|
&.@{col-prefix-cls}-rtl {
|
|
margin-right: percentage((@index / @grid-columns));
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.loop-grid-columns(@index, @class) when (@index = 0) {
|
|
.@{col-prefix-cls}-push-@{index} {
|
|
// reset property in RTL direction
|
|
&.@{col-prefix-cls}-rtl {
|
|
right: auto;
|
|
}
|
|
}
|
|
|
|
.@{col-prefix-cls}-pull-@{index} {
|
|
&.@{col-prefix-cls}-rtl {
|
|
left: auto;
|
|
}
|
|
}
|
|
|
|
.@{col-prefix-cls}@{class}-push-@{index} {
|
|
&.@{col-prefix-cls}-rtl {
|
|
right: auto;
|
|
}
|
|
}
|
|
|
|
.@{col-prefix-cls}@{class}-pull-@{index} {
|
|
&.@{col-prefix-cls}-rtl {
|
|
left: auto;
|
|
}
|
|
}
|
|
|
|
.@{col-prefix-cls}@{class}-offset-@{index} {
|
|
&.@{col-prefix-cls}-rtl {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
}
|