File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -473,6 +473,22 @@ For 4-column grid it should be:
473
473
474
474
and so on.
475
475
476
+ Here is a SASS code snipped which can make life easier (Thanks to @ascendantofrain , [ #81 ] ( https://github.com/troolee/gridstack.js/issues/81 ) ):
477
+
478
+ ``` sass
479
+ .grid-stack-item {
480
+
481
+ $gridstack-columns: 12;
482
+
483
+ @for $i from 1 through $gridstack-columns {
484
+ &[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
485
+ &[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
486
+ &.grid-stack-item[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
487
+ &.grid-stack-item[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
488
+ }
489
+ }
490
+ ```
491
+
476
492
## Save grid to array
477
493
478
494
Because gridstack doesn't track any kind of user-defined widget id there is no reason to make serialization to be part
You can’t perform that action at this time.
0 commit comments