2018-12-07 16:17:45 +08:00
|
|
|
@import '../../style/mixins/index';
|
2016-04-27 20:44:36 +08:00
|
|
|
|
2015-06-09 18:22:52 +08:00
|
|
|
// mixins for grid system
|
|
|
|
// ------------------------
|
2016-04-06 13:45:36 +08:00
|
|
|
|
2016-03-07 21:03:17 +08:00
|
|
|
.loop-grid-columns(@index, @class) when (@index > 0) {
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col@{class}-@{index} {
|
2016-03-24 14:36:15 +08:00
|
|
|
display: block;
|
2019-11-20 11:13:24 +08:00
|
|
|
flex: 0 0 percentage((@index / @grid-columns));
|
|
|
|
max-width: percentage((@index / @grid-columns));
|
2015-06-09 18:22:52 +08:00
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col@{class}-push-@{index} {
|
2015-06-09 18:22:52 +08:00
|
|
|
left: percentage((@index / @grid-columns));
|
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col@{class}-pull-@{index} {
|
2015-06-09 18:22:52 +08:00
|
|
|
right: percentage((@index / @grid-columns));
|
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col@{class}-offset-@{index} {
|
2015-06-09 18:22:52 +08:00
|
|
|
margin-left: percentage((@index / @grid-columns));
|
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col@{class}-order-@{index} {
|
2015-06-09 18:22:52 +08:00
|
|
|
order: @index;
|
|
|
|
}
|
2016-03-07 21:03:17 +08:00
|
|
|
.loop-grid-columns((@index - 1), @class);
|
2015-06-09 18:22:52 +08:00
|
|
|
}
|
|
|
|
|
2016-03-24 14:36:15 +08:00
|
|
|
.loop-grid-columns(@index, @class) when (@index = 0) {
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col@{class}-@{index} {
|
2017-02-21 11:56:51 +08:00
|
|
|
display: none;
|
2016-03-24 14:36:15 +08:00
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col-push-@{index} {
|
2015-06-09 18:22:52 +08:00
|
|
|
left: auto;
|
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-col-pull-@{index} {
|
2015-06-09 18:22:52 +08:00
|
|
|
right: auto;
|
|
|
|
}
|
2016-12-19 16:18:39 +08:00
|
|
|
.@{ant-prefix}-col@{class}-push-@{index} {
|
|
|
|
left: auto;
|
|
|
|
}
|
|
|
|
.@{ant-prefix}-col@{class}-pull-@{index} {
|
|
|
|
right: auto;
|
|
|
|
}
|
|
|
|
.@{ant-prefix}-col@{class}-offset-@{index} {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
.@{ant-prefix}-col@{class}-order-@{index} {
|
|
|
|
order: 0;
|
|
|
|
}
|
2015-06-09 18:22:52 +08:00
|
|
|
}
|
|
|
|
|
2016-03-07 21:03:17 +08:00
|
|
|
.make-grid(@class: ~'') {
|
|
|
|
.loop-grid-columns(@grid-columns, @class);
|
2016-02-20 16:33:01 +08:00
|
|
|
}
|