Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-grid-system

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-grid-system - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

lib/blocs-align-query.js

3

lib/blocs-query.js

@@ -43,3 +43,4 @@ 'use strict';

if (i1) {
_utils2.default.selectorsAdd(blocWidth[i1], blocs[units][width][0]);
var selectors = _utils2.default.flatten(blocs[units][width]);
_utils2.default.selectorsAdd(blocWidth[i1], selectors);
}

@@ -46,0 +47,0 @@ }

@@ -22,2 +22,3 @@ 'use strict';

bloc.selectors = _utils2.default.flatten(blocs);
bloc.append({ prop: 'margin-right', value: opts.gutter + 'rem' });

@@ -24,0 +25,0 @@ bloc.append({ prop: 'margin-bottom', value: opts.gutter + 'rem' });

@@ -43,5 +43,5 @@ 'use strict';

var _blocsFloatQuery = require('./blocs-float-query');
var _blocsAlignQuery = require('./blocs-align-query');
var _blocsFloatQuery2 = _interopRequireDefault(_blocsFloatQuery);
var _blocsAlignQuery2 = _interopRequireDefault(_blocsAlignQuery);

@@ -67,3 +67,3 @@ var _columnsQuery = require('./columns-query');

(0, _blocsFloatQuery2.default)(e.blocs[0], rootCss, opts);
(0, _blocsAlignQuery2.default)(e.blocs[0], rootCss, opts);
(0, _blocsQuery2.default)(e.blocs, rootCss, opts, 0);

@@ -79,3 +79,3 @@ (0, _fractionsQuery2.default)(e.fractions[0], rootCss, opts);

(0, _containersQuery2.default)(e.containers, mediaQuery, opts, breakpoint);
(0, _blocsFloatQuery2.default)(e.blocs[breakpoint], mediaQuery, opts);
(0, _blocsAlignQuery2.default)(e.blocs[breakpoint], mediaQuery, opts);
(0, _blocsQuery2.default)(e.blocs, mediaQuery, opts, breakpoint);

@@ -82,0 +82,0 @@ (0, _fractionsQuery2.default)(e.fractions[breakpoint], mediaQuery, opts);

@@ -56,28 +56,29 @@ 'use strict';

} else if (value[0] === 'bloc') {
var i = value[1].split('-');
i[1] = i[1] || '0';
e.blocs[breakpoint] = e.blocs[breakpoint] || [];
e.blocs[breakpoint][i[0]] = e.blocs[breakpoint][i[0]] || [];
e.blocs[breakpoint][i[0]][i[1]] = e.blocs[breakpoint][i[0]][i[1]] || [];
e.blocs[breakpoint][i[0]][i[1]].push(decl.parent.selector);
e.blocs[breakpoint][value[1]] = e.blocs[breakpoint][value[1]] || [];
if (value[2] === 'right') {
e.blocs[breakpoint][value[1]][0] = e.blocs[breakpoint][value[1]][0] || [];
e.blocs[breakpoint][value[1]][0].push(decl.parent.selector);
} else {
e.blocs[breakpoint][value[1]][1] = e.blocs[breakpoint][value[1]][1] || [];
e.blocs[breakpoint][value[1]][1].push(decl.parent.selector);
}
_utils2.default.nodeClean(decl, true);
} else if (value[0] === 'fraction') {
var _i = value[1].split('/');
var i = value[1].split('/');
e.fractions[breakpoint] = e.fractions[breakpoint] || [];
e.fractions[breakpoint][_i[1]] = e.fractions[breakpoint][_i[1]] || [];
e.fractions[breakpoint][_i[1]][_i[0]] = e.fractions[breakpoint][_i[1]][_i[0]] || [];
e.fractions[breakpoint][_i[1]][_i[0]].push(decl.parent.selector);
e.fractions[breakpoint][i[1]] = e.fractions[breakpoint][i[1]] || [];
e.fractions[breakpoint][i[1]][i[0]] = e.fractions[breakpoint][i[1]][i[0]] || [];
e.fractions[breakpoint][i[1]][i[0]].push(decl.parent.selector);
_utils2.default.nodeClean(decl, true);
} else if (value[0] === 'columns') {
var _i2 = value[1].split('-');
var _i = value[1].split('-');
_i2[1] = _i2[1] || '0';
_i[1] = _i[1] || '0';
e.columns[breakpoint] = e.columns[breakpoint] || [];
e.columns[breakpoint][_i2[0]] = e.columns[breakpoint][_i2[0]] || [];
e.columns[breakpoint][_i2[0]][_i2[1]] = e.columns[breakpoint][_i2[0]][_i2[1]] || [];
e.columns[breakpoint][_i2[0]][_i2[1]].push(decl.parent.selector);
e.columns[breakpoint][_i[0]] = e.columns[breakpoint][_i[0]] || [];
e.columns[breakpoint][_i[0]][_i[1]] = e.columns[breakpoint][_i[0]][_i[1]] || [];
e.columns[breakpoint][_i[0]][_i[1]].push(decl.parent.selector);

@@ -84,0 +85,0 @@ _utils2.default.nodeClean(decl, true);

{
"name": "postcss-grid-system",
"version": "0.2.2",
"version": "0.3.0",
"description": "A PostCSS plugin to create grids based on a fixed column width.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -91,3 +91,3 @@ # postcss-grid-system

`gs: bloc [width]`
`gs: bloc [width] [align]`

@@ -97,2 +97,3 @@ Blocs have a fixed width.

- _width_: width of the bloc.
- _align_: _left_ or _right_.

@@ -99,0 +100,0 @@ Example: [input](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/src/03.css), [output](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/dist/03.css), [markup](https://github.com/francoisromain/postcss-grid-system/blob/gh-pages/test/03.html), [demo](http://francoisromain.github.io/postcss-grid-system/test/03.html)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc