Skip to content

Commit 4bfa6cd

Browse files
authored
Merge pull request #2005 from sacalata/patch-3
Update readme.md
2 parents caf2736 + e0b86cf commit 4bfa6cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,15 @@ Better yet, here is a SASS code snippet which can make life much easier (Thanks
258258
259259
$gridstack-columns: 12;
260260
261-
min-width: math.div(100%, $gridstack-columns);
261+
min-width: 100%/$gridstack-columns;
262262
263263
@for $i from 0 through $gridstack-columns {
264-
&[gs-w='#{$i}'] { width: math.div(100%, $gridstack-columns) * $i; }
265-
&[gs-x='#{$i}'] { left: math.div(100%, $gridstack-columns) * $i; }
266-
&[gs-min-w='#{$i}'] { min-width: math.div(100%, $gridstack-columns) * $i; }
267-
&[gs-max-w='#{$i}'] { max-width: math.div(100%, $gridstack-columns) * $i; }
264+
&[gs-w='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
265+
&[gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
266+
&[gs-min-w='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
267+
&[gs-max-w='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
268268
}
269-
}
269+
}
270270
```
271271

272272
you can also use the SASS [src/gridstack-extra.scss](https://github.com/gridstack/gridstack.js/tree/master/src/gridstack-extra.scss) included in NPM package and modify to add more columns.

0 commit comments

Comments
 (0)