css-longhand

Expand CSS shorthands.


Keywords
css, shorthands, longhands, expand
License
MIT
Install
npm install css-longhand@1.1.2

Documentation

css-longhand Build Status

Expand CSS shorthands.

Why?

For HTML E-maliers.

Install

$ npm install --save css-longhand

Supported CSS properties:

  • margin

  • padding

  • border

Usage

var cssLonghand = require('css-longhand');
cssLonghand('/path/to/css');

Example:

.classname {
	margin: 0;
}

Pass to cssLonghand will result in:

.classname {
		margin-top: 0;
		margin-right: 0;
		margin-bottom: 0;
		margin-left: 0;
}

TODO:

  • Re-implement with streams (find the comment in the code)

  • Support more CSS properties.

License

MIT © hemanth.hm