Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ module.exports = function(grunt) {
'dist/gridstack-poly.js': ['src/gridstack-poly.js'],
'dist/jquery.js': ['src/jquery.js'],
'dist/jquery-ui.js': ['src/jquery-ui.js'],
'dist/src/gridstack.scss': ['src/gridstack.scss'],
'dist/src/gridstack-extra.scss': ['src/gridstack-extra.scss'],
}
}
},
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,18 @@ Better yet, here is a SASS code snippet which can make life much easier (Thanks
}
```

you can also look at the SASS [src/gridstack-extra.scss](https://github.com/gridstack/gridstack.js/blob/develop/src/gridstack-extra.scss) and modify to add more columns
you can also use the SASS [src/gridstack-extra.scss](https://github.com/gridstack/gridstack.js/blob/develop/src/gridstack-extra.scss) included in NPM package and modify to add more columns
and also have the `.grid-stack-N` prefix to support letting the user change columns dynamically.

Sample gulp command for 30 columns:
```js
gulp.src('node_modules/gridstack/dist/src/gridstack-extra.scss')
.pipe(replace('$gridstack-columns: 11 !default;','$gridstack-columns: 30;'))
.pipe(sass({outputStyle: 'compressed'}))
.pipe(rename({extname: '.min.css'}))
.pipe(gulp.dest('dist/css'))
```

## Override resizable/draggable options

You can override default `resizable`/`draggable` options. For instance to enable other then bottom right resizing handle
Expand Down
1 change: 1 addition & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Change log
## 1.1.0-dev (upcoming)

- fix [1187](https://github.com/gridstack/gridstack.js/issues/1187) IE support for `CustomEvent` polyfill - thanks [@phil-blais](https://github.com/phil-blais)
- include SASS source files to npm package again [1193](https://github.com/gridstack/gridstack.js/pull/1193)

## 1.1.0 (2020-02-29)

Expand Down
4 changes: 3 additions & 1 deletion src/gridstack-extra.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* 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: 11 !default;
$gridstack-columns-start: 2 !default;

@mixin grid-stack-items($columns) {
.grid-stack.grid-stack-#{$columns} {
Expand All @@ -23,6 +25,6 @@ $gridstack-columns: 11 !default;
}
}

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