diff --git a/Gruntfile.js b/Gruntfile.js index 479901507..8ff8961ca 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,6 +14,7 @@ module.exports = function(grunt) { grunt.initConfig({ sass: { options: { + // precision: 3, // doesn't work implementation: sass, sourceMap: false }, diff --git a/src/gridstack.scss b/src/gridstack.scss index 525ce6ac4..badfeed54 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -88,16 +88,14 @@ $animation_speed: .3s !default; } } - @for $i from 0 through $gridstack-columns { - &[gs-w='#{$i}'] { width: math.div(100%, $gridstack-columns) * $i; } + @for $i from 0 through ($gridstack-columns - 1) { &[gs-x='#{$i}'] { left: math.div(100%, $gridstack-columns) * $i; } + &[gs-w='#{$i + 1}'] { width: math.div(100%, $gridstack-columns) * ($i + 1); } } } &.grid-stack-1>.grid-stack-item { min-width: 100%; - &[gs-w='1'] { width: 100%; } - &[gs-x='0'] { left: 0; } } &.grid-stack-animate,