# css-shorthand-expand

> Expand CSS shorthand properties

Latest version **1.2.0** (published 2018-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install css-shorthand-expand
pnpm add css-shorthand-expand
yarn add css-shorthand-expand
bun add css-shorthand-expand
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2018-04-15 |
| First published | 2015-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Maintainers | kapetan |
| Keywords | css, shorthand, longhand, expand, properties |

## Links

- npm: https://www.npmjs.com/package/css-shorthand-expand
- Repository: https://github.com/kapetan/css-shorthand-expand
- Issues: https://github.com/kapetan/css-shorthand-expand/issues
- npm.io page: https://npm.io/package/css-shorthand-expand

## Dependencies (10)

- [xtend](https://npm.io/package/xtend.md) ^4.0.0
- [map-obj](https://npm.io/package/map-obj.md) ^1.0.0
- [hsl-regex](https://npm.io/package/hsl-regex.md) ^1.0.0
- [rgb-regex](https://npm.io/package/rgb-regex.md) ^1.0.1
- [hsla-regex](https://npm.io/package/hsla-regex.md) ^1.0.0
- [rgba-regex](https://npm.io/package/rgba-regex.md) ^1.0.0
- [css-url-regex](https://npm.io/package/css-url-regex.md) 0.0.1
- [repeat-element](https://npm.io/package/repeat-element.md) ^1.1.0
- [css-color-names](https://npm.io/package/css-color-names.md) 0.0.1
- [hex-color-regex](https://npm.io/package/hex-color-regex.md) ^1.0.1

## 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

- 1.2.0 (latest) — 2018-04-15
- 1.1.1 — 2018-04-05
- 1.1.0 — 2015-11-26
- 1.0.1 — 2015-05-05
- 1.0.0 — 2015-03-29

## README

# css-shorthand-expand

[![Build Status](https://travis-ci.org/kapetan/css-shorthand-expand.svg?branch=master)](https://travis-ci.org/kapetan/css-shorthand-expand)

Expand CSS shorthand properties to their longhand equivalent.

	npm install css-shorthand-expand

# Usage

The module exposes a single function which takes a property name and a value and returns a map with the expanded properties.

```javascript
var expand = require('css-shorthand-expand');

expand('background', 'url(image.png) no-repeat #ff0');
```

The above returns an object.

```javascript
{
	'background-image': 'url(image.png)',
	'background-repeat': 'no-repeat',
	'background-color': '#ff0'
}
```

Currently the following properties are supported.

- background
- font
- padding
- margin
- border
- border-width
- border-style
- border-color
- border-top
- border-right
- border-bottom
- border-left
- border-radius
- outline

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