Margin helpers for PostCSS.
$ npm install postcss-margin-helpers [--save[-dev]]
var postcss = require('postcss');
var margin = require('postcss-margin-helpers');
var rule = postcss.parse([
'a {',
' margin-top: 0;',
' margin: 5px 10px 20px;',
' margin-bottom: 40px;',
'}'
].join('')).first;
margin.top(rule); // 5px
margin.right(rule); // 10px
margin.bottom(rule); // 40px
margin.left(rule); // 10px
$ npm test
This will run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.