forked from gridstack/gridstack.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgridstack-extra.scss
More file actions
30 lines (25 loc) · 973 Bytes
/
Copy pathgridstack-extra.scss
File metadata and controls
30 lines (25 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*!
* gridstack 2.0.0 extra CSS for [2-11] columns (non default)
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
*/
// default to generate [2-11] columns as 1 (oneColumnMode) and 12 (default) are in the main css
$gridstack-columns-start: 2 !default;
$gridstack-columns: 11 !default;
@mixin grid-stack-items($columns) {
.grid-stack.grid-stack-#{$columns} {
> .grid-stack-item {
min-width: 100% / $columns;
@for $i from 1 through $columns {
&[data-gs-width='#{$i}'] { width: (100% / $columns) * $i; }
&[data-gs-x='#{$i}'] { left: (100% / $columns) * $i; }
&[data-gs-min-width='#{$i}'] { min-width: (100% / $columns) * $i; }
&[data-gs-max-width='#{$i}'] { max-width: (100% / $columns) * $i; }
}
}
}
}
@for $j from $gridstack-columns-start through $gridstack-columns {
@include grid-stack-items($j)
}