Skip to content
Open
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and then on the command line,
lessc file.less --autoprefix="browsers"
```

The browsers are a comma seperated list of [browsers as specified with autoprefixer](https://github.com/postcss/autoprefixer#browsers).
The browsers are a comma seperated list of [browsers as specified with autoprefixer](https://github.com/postcss/autoprefixer#browsers). For use autoprefixer grid fallback option, add "grid-on" in browser list.

## Programmatic usage

Expand Down
9 changes: 6 additions & 3 deletions lib/parse-options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
module.exports = function(options) {
if (typeof options === 'string') {
var browsers = options.replace(/\s*,\s*/g, ",").split(",");
options = {browsers: browsers};
var options = options.replace(/\s*,\s*/g, ",").split(",");
var opt = {
browsers: options.filter(function(el){ return el !== 'grid-on' }),
grid: options.indexOf('grid-on') != -1 ? true : false
};
}
return options;
return opt;
};