postcss-flexgrid
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -0,3 +1,7 @@ | ||
# 1.1.0 - 2015-03-20 | ||
✨ Adds `gutter()` value helper that returns calculated gutter size. | ||
# 1.0.0 - 2015-02-05 | ||
✨ First release, minimal features. |
21
index.js
@@ -80,2 +80,23 @@ var _ = require('lodash'); | ||
// Helper that returns gutter width as a percentage value | ||
// This helper receives 2 parameters: | ||
// `container_columns` => Amount of columns of the container element | ||
// `gutter_width` => To override the main gutter width (Only if you know what you're doing) | ||
// Examples: | ||
// outerDiv { | ||
// span: 6 of 12; | ||
// } | ||
// innerDiv { | ||
// width: span(4); | ||
// margin-left: gutter(6); | ||
// } | ||
if (decl.value !== null && decl.value.indexOf('gutter(') !== -1) { | ||
cols = decl.value.match(asValueRE); | ||
container_columns = cols && cols[1]; | ||
gutter_width = cols && cols[2]; | ||
decl.value = flexGutter(container_columns, gutter_width) + '%'; | ||
} | ||
}); | ||
@@ -82,0 +103,0 @@ |
{ | ||
"name": "postcss-flexgrid", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "PostCSS helpers for defining a flexible grid in PostCSS", | ||
@@ -5,0 +5,0 @@ "repository": { |
6568
90