# shrthnd

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

Latest version **0.0.6** (published 2015-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install shrthnd
pnpm add shrthnd
yarn add shrthnd
bun add shrthnd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2015-03-26 |
| First published | 2014-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 60 |
| Author | Francis Marineau |
| Maintainers | zoukiny611 |
| Keywords | css, shorthand, properties |

## Links

- npm: https://www.npmjs.com/package/shrthnd
- Repository: https://github.com/frankmarineau/shrthnd.js
- Issues: https://github.com/frankmarineau/shrthnd.js/issues
- npm.io page: https://npm.io/package/shrthnd

## Dependencies (1)

- [css](https://npm.io/package/css.md) ^2.1.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2015-03-26
- 0.0.5 — 2015-03-26
- 0.0.4 — 2015-03-26
- 0.0.3 — 2015-03-26
- 0.0.2 — 2014-08-13
- 0.0.1 — 2014-08-11

## README

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);

---
_Source: https://npm.io/package/shrthnd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
