/*!
 * gridstack 3.3.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 {
        &[gs-w='#{$i}'] { width: (100% / $columns) * $i; }
        &[gs-x='#{$i}'] { left: (100% / $columns) * $i; }
        &[gs-min-w='#{$i}'] { min-width: (100% / $columns) * $i; }
        &[gs-max-w='#{$i}'] { max-width: (100% / $columns) * $i; }
      }
    }
  }
}

@for $j from $gridstack-columns-start through $gridstack-columns {
  @include grid-stack-items($j)
}
