# rework-suit

> Rework plugin for SUIT CSS

Latest version **4.0.0** (published 2014-07-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install rework-suit
pnpm add rework-suit
yarn add rework-suit
bun add rework-suit
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2014-07-01 |
| First published | 2013-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 50 |
| Author | Nicolas Gallagher |
| Maintainers | necolas |

## Links

- npm: https://www.npmjs.com/package/rework-suit
- Repository: https://github.com/suitcss/rework-suit
- Issues: https://github.com/suitcss/rework-suit/issues
- npm.io page: https://npm.io/package/rework-suit

## Dependencies (7)

- [rework](https://npm.io/package/rework.md) ^1.0.0
- [rework-npm](https://npm.io/package/rework-npm.md) ^1.0.0
- [rework-calc](https://npm.io/package/rework-calc.md) ^1.0.0
- [rework-vars](https://npm.io/package/rework-vars.md) ^3.1.1
- [rework-ie-limits](https://npm.io/package/rework-ie-limits.md) ~0.1.1
- [rework-custom-media](https://npm.io/package/rework-custom-media.md) ~0.1.0
- [rework-suit-conformance](https://npm.io/package/rework-suit-conformance.md) ~0.4.0

## Recent versions

- 4.0.0 (latest) — 2014-07-01
- 3.1.0 — 2014-06-24
- 3.0.0 — 2014-06-20
- 2.0.0 — 2014-04-21
- 1.0.0 — 2014-02-08
- 0.5.0 — 2014-01-03
- 0.4.1 — 2013-12-18
- 0.4.0 — 2013-12-18
- 0.3.0 — 2013-12-01
- 0.2.0 — 2013-11-22
- 0.1.1 — 2013-11-21
- 0.1.0 — 2013-11-21

## README

# rework-suit

[![Build Status](https://secure.travis-ci.org/suitcss/rework-suit.png?branch=master)](http://travis-ci.org/suitcss/rework-suit)

A [Rework](https://github.com/reworkcss/rework) plugin for use with
[SUIT CSS](https://github.com/suitcss/suit).

## Installation

Install with npm:

```
npm install --save-dev rework-suit
```

## Use

As a Rework plugin:

```js
var css = fs.readFileSync('build/build.css', 'utf8').toString();

var processed = rework(css)
  .use(suit(options))
  .toString();
```

Where `options` has properties `alias`, `root`, and `shim` corresponding to the
options available in [rework-npm](https://github.com/reworkcss/rework-npm).

## Features

* [rework-vars](https://github.com/reworkcss/rework-vars): use [W3C-style CSS Variables](http://www.w3.org/TR/css-variables/).
* [rework-custom-media](https://github.com/reworkcss/rework-custom-media): use [W3C-style CSS Custom Media Queries](http://dev.w3.org/csswg/mediaqueries/#custom-mq).
* [rework-npm](https://github.com/reworkcss/rework-npm): an `@import` inliner.
* [rework-calc](https://github.com/reworkcss/rework-calc): resolve basic `calc()` expressions.
* [rework-suit-conformance](https://github.com/suitcss/rework-suit-conformance): SUIT CSS conformance checks on imported files.
* [rework-ie-limits](https://github.com/reworkcss/rework-ie-limits): IE selector limit check.

Original:

```css
@import "normalize.css";

@custom-media --narrow-viewport all and (min-width:300px);

:root {
  --color: green;
  --width: 100px;
}

@media (--narrow-viewport) {
  .example {
    /* simple variable */
    color: var(--color);
    /* variable with fallback */
    outline: var(--outline, 1px solid red);
    /* calc */
    width: calc(var(--width) * 2);
  }
}
```

yields:

```css
/* …inlined normalize.css source code… */

@media all and (min-width:300px) {
  .example {
    /* simple variable */
    color: green;
    /* variable with fallback */
    outline: 1px solid red;
    /* calc */
    width: 200px;
  }
}
```

## Testing

Install all dependencies and run the tests:

```
npm install && npm test
```

Watch and re-run the tests:

```
npm run watch
```

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