Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jednano/postcss-margin-helpers
Margin helpers for PostCSS.
https://github.com/jednano/postcss-margin-helpers
Last synced: 25 days ago
JSON representation
Margin helpers for PostCSS.
- Host: GitHub
- URL: https://github.com/jednano/postcss-margin-helpers
- Owner: jednano
- License: mit
- Created: 2015-09-28T22:57:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-03T16:32:42.000Z (about 9 years ago)
- Last Synced: 2024-09-22T00:45:41.169Z (about 1 month ago)
- Language: JavaScript
- Size: 120 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-margin-helpers
[![NPM version](http://img.shields.io/npm/v/postcss-margin-helpers.svg?style=flat)](https://www.npmjs.org/package/postcss-margin-helpers)
[![npm license](http://img.shields.io/npm/l/postcss-margin-helpers.svg?style=flat-square)](https://www.npmjs.org/package/postcss-margin-helpers)
[![Travis Build Status](https://img.shields.io/travis/jedmao/postcss-margin-helpers.svg?label=unix)](https://travis-ci.org/jedmao/postcss-margin-helpers)[![npm](https://nodei.co/npm/postcss-margin-helpers.svg?downloads=true)](https://nodei.co/npm/postcss-margin-helpers/)
Margin helpers for [PostCSS](https://github.com/postcss/postcss).
## Installation
```
$ npm install postcss-margin-helpers [--save[-dev]]
```## Usage
```js
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.