element/packages/theme-chalk/src/col.scss

119 lines
2.1 KiB
SCSS
Raw Normal View History

@import "./common/var.scss";
2017-10-17 09:01:55 +00:00
@import "./mixins/mixins.scss";
2017-10-17 09:01:55 +00:00
[class*="el-col-"] {
float: left;
box-sizing: border-box;
}
2017-10-17 09:01:55 +00:00
[class*="-0"] {
display: none;
}
2017-10-17 09:01:55 +00:00
@for $i from 1 through 24 {
.el-col-#{$i} {
width: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-offset-#{$i} {
margin-left: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-pull-#{$i} {
position: relative;
right: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-push-#{$i} {
position: relative;
left: (1 / 24 * $i * 100) * 1%;
}
}
2017-10-17 09:01:55 +00:00
@include res(xs) {
@for $i from 1 through 24 {
.el-col-xs-#{$i} {
width: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-xs-offset-#{$i} {
margin-left: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-xs-pull-#{$i} {
position: relative;
right: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-xs-push-#{$i} {
position: relative;
left: (1 / 24 * $i * 100) * 1%;
}
}
}
2017-10-17 09:01:55 +00:00
@include res(sm) {
@for $i from 1 through 24 {
.el-col-sm-#{$i} {
width: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-sm-offset-#{$i} {
margin-left: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-sm-pull-#{$i} {
position: relative;
right: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-sm-push-#{$i} {
position: relative;
left: (1 / 24 * $i * 100) * 1%;
}
}
}
2017-10-17 09:01:55 +00:00
@include res(md) {
@for $i from 1 through 24 {
.el-col-md-#{$i} {
width: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-md-offset-#{$i} {
margin-left: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-md-pull-#{$i} {
position: relative;
right: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-md-push-#{$i} {
position: relative;
left: (1 / 24 * $i * 100) * 1%;
}
}
}
2017-10-17 09:01:55 +00:00
@include res(lg) {
@for $i from 1 through 24 {
.el-col-lg-#{$i} {
width: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-lg-offset-#{$i} {
margin-left: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-lg-pull-#{$i} {
position: relative;
right: (1 / 24 * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-lg-push-#{$i} {
position: relative;
left: (1 / 24 * $i * 100) * 1%;
}
}
}