3.0.0 • Published 9 years ago

postcss-margin-helpers v3.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

postcss-margin-helpers

NPM version npm license Travis Build Status

npm

Font helpers for PostCSS.

Installation

$ npm install postcss-margin-helpers [--save[-dev]]

Usage

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

Testing

$ npm test

This will run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.