# postcss-composes-enhanced

> Enhance the composes behavior in CSS Modules

Latest version **1.0.0** (published 2020-06-09) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install postcss-composes-enhanced
pnpm add postcss-composes-enhanced
yarn add postcss-composes-enhanced
bun add postcss-composes-enhanced
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-06-09 |
| First published | 2020-06-09 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 1 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jonathan Neal |
| Maintainers | jonathantneal |
| Keywords | postcss, postcss-plugin, advanced, at, at-rule, at-rules, atrule, atrules, behavior, behaviors, compose-with, compose, composes, css, css-module, css-modules, cssmodule, cssmodules, declaration, declarations, enhanced, extend, extends, icss, icss-module, icss-modules, icssmodule, module, modules, properties, property, rule, rules |

## Links

- npm: https://www.npmjs.com/package/postcss-composes-enhanced
- Repository: https://github.com/csstools/postcss-composes-enhanced
- Homepage: https://github.com/csstools/postcss-composes-enhanced#readme
- Issues: https://github.com/csstools/postcss-composes-enhanced/issues
- npm.io page: https://npm.io/package/postcss-composes-enhanced

## Dependencies (1)

- [css-import-resolve](https://npm.io/package/css-import-resolve.md) ^1.0.2

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-06-09

## README

# PostCSS Composes Enhanced [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]

[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]

[PostCSS Composes Enhanced] lets you enhance the composes behavior in CSS Modules.

```pcss
.example {
  @composes no-margin from '@company/layout';
}

/* becomes */

.example {
  composes: no-margin from '../../node_modules/@company/layout/index.module.css';
}
```

## Usage

Add [PostCSS Composes Enhanced] to your project:

```bash
npm install postcss-composes-enhanced --save-dev
```

Use **PostCSS Composes Enhanced** to process your CSS:

```js
const composesEnhanced = require('postcss-composes-enhanced')

composesEnhanced.process(YOUR_CSS /*, processOptions, pluginOptions */)
```

Or use it as a [PostCSS] plugin:

```js
const postcss = require('postcss')
const composesEnhanced = require('postcss-composes-enhanced')

postcss([composesEnhanced(/* pluginOptions */)]).process(YOUR_CSS /*, processOptions */)
```

**PostCSS Composes Enhanced** runs in all Node environments, with special instructions for:

| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
| ----------------------- | ------------------------------------- | ----------------------------- | ----------------------------------------------- | ----------------------- | ------------------------- |


## Options

### resolveImports

The `resolveImports` option determines whether imports within `composes` declarations should be resolved.

### transformAtRules

The `transformAtRules` option determines whether `@composes` at-rules should be transformed into declarations.

## Additional Options

Additional options will be passed through into [`css-import-resolve`](https://github.com/csstools/css-import-resolve#options).

[cli-img]: https://img.shields.io/travis/csstools/postcss-composes-enhanced/master.svg
[cli-url]: https://travis-ci.org/csstools/postcss-composes-enhanced
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/postcss/postcss
[npm-img]: https://img.shields.io/npm/v/postcss-composes-enhanced.svg
[npm-url]: https://www.npmjs.com/package/postcss-composes-enhanced
[postcss]: https://github.com/postcss/postcss
[postcss composes enhanced]: https://github.com/csstools/postcss-composes-enhanced

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