postcss-grid-system
Advanced tools
Comparing version 0.1.6 to 0.2.0
@@ -29,9 +29,2 @@ 'use strict'; | ||
} | ||
if (width > 1 && width < opts.max) { | ||
for (var offset = 1; offset <= opts.max - width; offset++) { | ||
if (blocs[width][offset]) { | ||
_utils2.default.selectorsAdd(blocFloat, blocs[width][offset]); | ||
} | ||
} | ||
} | ||
} | ||
@@ -38,0 +31,0 @@ } |
@@ -45,19 +45,2 @@ 'use strict'; | ||
} | ||
if (width > 1 && width < opts.max) { | ||
for (var offset = 1; offset + width <= opts.max; offset++) { | ||
var i2 = false; | ||
if (width + offset <= breakpoint && units === breakpoint) { | ||
i2 = width; | ||
} else if (width + offset >= breakpoint && breakpoint - offset > 1) { | ||
i2 = breakpoint - offset; | ||
} else if (units === breakpoint) { | ||
i2 = 1; | ||
} | ||
if (i2) { | ||
_utils2.default.selectorsAdd(blocWidth[i2], blocs[units][width][offset]); | ||
} | ||
} | ||
} | ||
} | ||
@@ -64,0 +47,0 @@ } |
@@ -39,18 +39,2 @@ 'use strict'; | ||
} | ||
if (width > 1 && width < opts.max) { | ||
for (var offset = 1; offset <= opts.max - width; offset++) { | ||
var i2 = false; | ||
if (width + offset <= breakpoint && breakpoint === units) { | ||
i2 = width; | ||
} else if (width + offset >= breakpoint && breakpoint - offset >= 1) { | ||
i2 = breakpoint - offset; | ||
} else if (breakpoint === units) { | ||
i2 = 1; | ||
} | ||
if (i2) { | ||
_utils2.default.selectorsAdd(columnCount[i2], columns[units][width][offset]); | ||
} | ||
} | ||
} | ||
} | ||
@@ -57,0 +41,0 @@ } |
{ | ||
"name": "postcss-grid-system", | ||
"version": "0.1.6", | ||
"version": "0.2.0", | ||
"description": "A PostCSS plugin to create grids based on a fixed column width.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -121,3 +121,3 @@ # postcss-grid-system | ||
`gs: bloc [width](-[offset])` | ||
`gs: bloc [width]` | ||
@@ -127,3 +127,2 @@ Blocs have a fixed width. | ||
- _width_: width of the bloc. | ||
- _offset_ (optional): remaining space before the bloc can take its width. if (_width_ + _offset_) is wider than _breakpoint_, then _width_ shrinks first. | ||
@@ -138,6 +137,2 @@ ##### Example | ||
.my-bloc-with-offset { | ||
gs: bloc 2-3; | ||
} | ||
``` | ||
@@ -147,4 +142,2 @@ | ||
04: [input](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/src/04.css), [output](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/dist/04.css), [markup](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/04.html), [demo](http://francoisromain.github.io/postcss-grid-system/test/04.html) | ||
### Fractions | ||
@@ -172,6 +165,5 @@ | ||
`gs: columns [columns](-[offset])` | ||
`gs: columns [columns]` | ||
- _columns_: number of columns. | ||
- _offset_ (optional): remaining space before the columns are active. If (_columns_ + _offset_) is greater than _breakpoint_, then _columns_ shrinks first. | ||
@@ -186,6 +178,2 @@ ##### Example | ||
.my-columns-with-offset { | ||
gs: columns 4-2; | ||
} | ||
``` | ||
@@ -195,3 +183,1 @@ | ||
07: [input](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/src/07.css), [output](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/dist/07.css), [markup](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/07.html), [demo](http://francoisromain.github.io/postcss-grid-system/test/07.html) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25944
449
177