# postcss-container

> PostCSS plugin that adds a user input scope to each selector, based on postcss-scopify

Latest version **0.1.1** (published 2018-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-container
pnpm add postcss-container
yarn add postcss-container
bun add postcss-container
```

## 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.1.1 |
| Published | 2018-10-08 |
| First published | 2018-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | techhtml |
| Maintainers | techhtml |
| Keywords | postcss, css, postcss-plugin, scope, scoped css, css post processing |

## Links

- npm: https://www.npmjs.com/package/postcss-container
- Repository: https://github.com/techhtml/postcss-container
- Issues: https://github.com/techhtml/postcss-container/issues
- npm.io page: https://npm.io/package/postcss-container

## Dependencies (1)

- [postcss](https://npm.io/package/postcss.md) ^5.0.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.1.1 (latest) — 2018-10-08
- 0.1.0 — 2018-10-08

## README

# PostCSS Container

[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Downloads][downloads-image]][downloads-url]

[PostCSS] plugin that adds a user input scope to each selector.
for a command line interface.

[`poststylus`]: https://github.com/seaneking/poststylus
[PostCSS API]:  https://github.com/postcss/postcss/blob/master/docs/api.md
[Broccoli]:     https://github.com/jeffjewiss/broccoli-postcss
[CLI tool]:     https://github.com/code42day/postcss-cli
[webpack]:      https://github.com/postcss/postcss-loader
[Brunch]:       https://github.com/iamvdo/postcss-brunch
[Grunt]:        https://github.com/nDmitry/grunt-postcss
[Gulp]:         https://github.com/postcss/gulp-postcss
[ENB]:          https://github.com/theprotein/enb-postcss

[travis-image]: https://img.shields.io/travis/pazams/postcss-scopify.svg?style=flat-square
[travis-url]: https://travis-ci.org/pazams/postcss-scopify
[coveralls-image]: https://img.shields.io/coveralls/pazams/postcss-scopify.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/pazams/postcss-scopify
[downloads-image]: https://img.shields.io/npm/dm/postcss-scopify.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/postcss-scopify

[PostCSS]: https://github.com/postcss/postcss

__Example input__

```css
.foo, .boo h1 {
    /* declarations */
}

& {
    /* declarations */
}
```
__Example output__
`scopify('#scope')`
```css
#scope .foo, #scope .boo h1 {
    /* declarations */
}

#scope {
    /* declarations */
}
```

## Installation

```
npm install postcss-cotaniner
```

## Usage

```javascript
var fs                 = require('fs');
var postcss            = require('postcss');
var postcssContainer   = require('postcss-container');

var css = fs.readFileSync('css/my-file.css', 'utf8').toString();
var out = postcss()
          .use(postcssContainer('#scope'))
          .process(css)
          .css;
```

You can use PostCSS with your build tool.
Note there are plugins for [Grunt], [Gulp], [webpack], [Broccoli],
[Brunch] and [ENB]. 
See [PostCSS] docs for examples for your environment.

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