postcss-grid-fluid
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -24,11 +24,7 @@ 'use strict'; | ||
for (var i in options) { | ||
if (opts && opts.hasOwnProperty(i) && options.hasOwnProperty(i)) { | ||
options[i] = opts[i]; | ||
} | ||
} | ||
Object.assign(options, opts); | ||
return function (css) { | ||
css.walk(function (node) { | ||
if (node.type === 'atrule' && node.name.match(/^gf/)) { | ||
if (node.type === 'atrule' && node.name.match(/^gf$/)) { | ||
node.walkDecls(function (decl) { | ||
@@ -40,4 +36,4 @@ if (decl.prop.match(/^gutter/) || decl.prop.match(/^display/) || decl.prop.match(/^width/)) { | ||
node.remove(); | ||
} else if (node.type === 'decl' && node.prop.match(/^gf/)) { | ||
var value = node.value.split(' '); | ||
} else if (node.type === 'decl' && node.prop.match(/^gf$/)) { | ||
var value = node.value.split(/\s+(?![^\[]*\]|[^(]*\)|[^\{]*})/); | ||
if (value[0] === 'row') { | ||
@@ -44,0 +40,0 @@ value[1] = value[1] || options.gutter; |
{ | ||
"name": "postcss-grid-fluid", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A PostCSS plugin to create fluid grids.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
12666
183