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

157 lines
2.9 KiB
SCSS
Raw Normal View History

@use "sass:math";
@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
2017-10-19 07:54:01 +00:00
.el-col-0 {
2017-10-17 09:01:55 +00:00
display: none;
}
@for $i from 0 through 24 {
.el-col-#{$i} {
width: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-offset-#{$i} {
margin-left: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-pull-#{$i} {
position: relative;
right: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-push-#{$i} {
position: relative;
left: (math.div(1 , 24) * $i * 100) * 1%;
}
}
2017-10-17 09:01:55 +00:00
@include res(xs) {
2017-10-19 07:54:01 +00:00
.el-col-xs-0 {
display: none;
}
@for $i from 0 through 24 {
.el-col-xs-#{$i} {
width: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-xs-offset-#{$i} {
margin-left: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-xs-pull-#{$i} {
position: relative;
right: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-xs-push-#{$i} {
position: relative;
left: (math.div(1 , 24) * $i * 100) * 1%;
}
}
}
2017-10-17 09:01:55 +00:00
@include res(sm) {
2017-10-19 07:54:01 +00:00
.el-col-sm-0 {
display: none;
}
@for $i from 0 through 24 {
.el-col-sm-#{$i} {
width: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-sm-offset-#{$i} {
margin-left: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-sm-pull-#{$i} {
position: relative;
right: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-sm-push-#{$i} {
position: relative;
left: (math.div(1 , 24) * $i * 100) * 1%;
}
}
}
2017-10-17 09:01:55 +00:00
@include res(md) {
2017-10-19 07:54:01 +00:00
.el-col-md-0 {
display: none;
}
@for $i from 0 through 24 {
.el-col-md-#{$i} {
width: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-md-offset-#{$i} {
margin-left: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-md-pull-#{$i} {
position: relative;
right: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-md-push-#{$i} {
position: relative;
left: (math.div(1 , 24) * $i * 100) * 1%;
}
}
}
2017-10-17 09:01:55 +00:00
@include res(lg) {
2017-10-19 07:54:01 +00:00
.el-col-lg-0 {
display: none;
}
@for $i from 0 through 24 {
.el-col-lg-#{$i} {
width: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-lg-offset-#{$i} {
margin-left: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-lg-pull-#{$i} {
position: relative;
right: (math.div(1 , 24) * $i * 100) * 1%;
}
2017-10-17 09:01:55 +00:00
.el-col-lg-push-#{$i} {
position: relative;
left: (math.div(1 , 24) * $i * 100) * 1%;
}
}
2017-10-19 07:54:01 +00:00
}
@include res(xl) {
.el-col-xl-0 {
display: none;
}
@for $i from 0 through 24 {
2017-10-19 07:54:01 +00:00
.el-col-xl-#{$i} {
width: (math.div(1 , 24) * $i * 100) * 1%;
2017-10-19 07:54:01 +00:00
}
.el-col-xl-offset-#{$i} {
margin-left: (math.div(1 , 24) * $i * 100) * 1%;
2017-10-19 07:54:01 +00:00
}
.el-col-xl-pull-#{$i} {
position: relative;
right: (math.div(1 , 24) * $i * 100) * 1%;
2017-10-19 07:54:01 +00:00
}
.el-col-xl-push-#{$i} {
position: relative;
left: (math.div(1 , 24) * $i * 100) * 1%;
2017-10-19 07:54:01 +00:00
}
}
}