fix xs resolution style (#2011)

pull/2020/head
baiyaaaaa 2016-12-27 14:59:21 +08:00 committed by cinwell.li
parent 2eea08af23
commit a9a3e8b638
1 changed files with 23 additions and 8 deletions

View File

@ -7,26 +7,41 @@
} }
@for $i from 1 to 24 { @for $i from 1 to 24 {
.el-col-$i, .el-col-$i {
.el-col-xs-$i {
width: calc(1 / 24 * $(i) * 100)%; width: calc(1 / 24 * $(i) * 100)%;
} }
.el-col-offset-$i, .el-col-offset-$i {
.el-col-xs-offset-$i {
margin-left: calc(1 / 24 * $(i) * 100)%; margin-left: calc(1 / 24 * $(i) * 100)%;
} }
.el-col-pull-$i, .el-col-pull-$i {
.el-col-xs-pull-$i {
position: relative; position: relative;
right: calc(1 / 24 * $(i) * 100)%; right: calc(1 / 24 * $(i) * 100)%;
} }
.el-col-push-$i, .el-col-push-$i {
.el-col-xs-push-$i {
position: relative; position: relative;
left: calc(1 / 24 * $(i) * 100)%; left: calc(1 / 24 * $(i) * 100)%;
} }
} }
@media (max-width: 768px) {
@for $i from 1 to 24 {
.el-col-xs-$i {
width: calc(1 / 24 * $(i) * 100)%;
}
.el-col-xs-offset-$i {
margin-left: calc(1 / 24 * $(i) * 100)%;
}
.el-col-xs-pull-$i {
position: relative;
right: calc(1 / 24 * $(i) * 100)%;
}
.el-col-xs-push-$i {
position: relative;
left: calc(1 / 24 * $(i) * 100)%;
}
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
@for $i from 1 to 24 { @for $i from 1 to 24 {
.el-col-sm-$i { .el-col-sm-$i {