gridstack.js/src/gridstack-extra.scss

22 lines
736 B
SCSS
Raw Permalink Normal View History

2016-02-10 17:13:47 +01:00
$gridstack-columns: 12 !default;
2015-06-20 07:02:42 +02:00
@mixin grid-stack-items($gridstack-columns) {
.grid-stack.grid-stack-#{$gridstack-columns} {
> .grid-stack-item {
min-width: 100% / $gridstack-columns;
@for $i from 1 through $gridstack-columns {
&[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
&[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
&[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
&[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
}
}
}
}
@for $j from 1 through $gridstack-columns {
@include grid-stack-items($j)
}