0.0.6 • Published 9 years ago

shrthnd v0.0.6

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

shrthnd.js

Makes your CSS files lighter and more readable by converting and combining properties into their shorthand versions when possible.

Installation

npm install shrthnd

Usage

The module takes a CSS string as only parameter and returns an object containing two properties:

  • string: The shorthanded CSS string
  • longPropertiesPositions: An array containing the position (row & column in input string) of the properties that have been shorthanded

Example

var cssString = 'body { background-image: url(/img/meow.jpg); background-position: top center; }';

var shrthnd = require('shrthnd');
var shorthandedCss = shrthnd(cssString);
console.log(shorthandedCss.string);
0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

10 years ago

0.0.1

10 years ago