# @jtmi/postcss-modules-local-by-default

> 君土母语编程小程序 A CSS Modules transform to make local scope the default

Latest version **0.0.2** (published 2021-12-21) · 0 weekly downloads

## Install

```sh
npm install @jtmi/postcss-modules-local-by-default
pnpm add @jtmi/postcss-modules-local-by-default
yarn add @jtmi/postcss-modules-local-by-default
bun add @jtmi/postcss-modules-local-by-default
```

## 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.2 |
| Published | 2021-12-21 |
| First published | 2021-12-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6 |
| Dependencies | 4 |
| Unpacked size | 23 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Zhou Dengxiang |
| Maintainers | juntulan |
| Keywords | css-modules, postcss, css, postcss-plugin |

## Links

- npm: https://www.npmjs.com/package/@jtmi/postcss-modules-local-by-default
- npm.io page: https://npm.io/package/@jtmi/postcss-modules-local-by-default

## Dependencies (4)

- [postcss](https://npm.io/package/postcss.md) ^7.0.32
- [icss-utils](https://npm.io/package/icss-utils.md) ^4.1.1
- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^4.1.0
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^6.0.2

## 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.2 (latest) — 2021-12-21
- 0.0.1 — 2021-12-19

## README

[![Build Status][ci-img]][ci] [![codecov][codecov-img]][codecov] [![npm][npm-img]][npm]

# CSS Modules: Local by Default

Transformation examples:

```css
.foo { ... } /* => */ :local(.foo) { ... }

.foo .bar { ... } /* => */ :local(.foo) :local(.bar) { ... }

/* Shorthand global selector */

:global .foo .bar { ... } /* => */ .foo .bar { ... }

.foo :global .bar { ... } /* => */ :local(.foo) .bar { ... }

/* Targeted global selector */

:global(.foo) .bar { ... } /* => */ .foo :local(.bar) { ... }

.foo:global(.bar) { ... } /* => */ :local(.foo).bar { ... }

.foo :global(.bar) .baz { ... } /* => */ :local(.foo) .bar :local(.baz) { ... }

.foo:global(.bar) .baz { ... } /* => */ :local(.foo).bar :local(.baz) { ... }
```

## Building

```bash
$ npm install
$ npm test
```

 - Build: [![Build Status][ci-img]][ci]
 - Lines: [![coveralls][coveralls-img]][coveralls]
 - Statements: [![codecov][codecov-img]][codecov]

## Development

```bash
$ npm run autotest
```

## License

MIT

## With thanks

 - [Tobias Koppers](https://github.com/sokra)
 - [Glen Maddern](https://github.com/geelen)

---
Mark Dalgleish, 2015.

[ci-img]:        https://img.shields.io/travis/css-modules/postcss-modules-local-by-default/master.svg?style=flat-square
[ci]:            https://travis-ci.org/css-modules/postcss-modules-local-by-default
[npm-img]:       https://img.shields.io/npm/v/postcss-modules-local-by-default.svg?style=flat-square
[npm]:           https://www.npmjs.com/package/postcss-modules-local-by-default
[coveralls-img]: https://img.shields.io/coveralls/css-modules/postcss-modules-local-by-default/master.svg?style=flat-square
[coveralls]:     https://coveralls.io/r/css-modules/postcss-modules-local-by-default?branch=master
[codecov-img]:   https://img.shields.io/codecov/c/github/css-modules/postcss-modules-local-by-default/master.svg?style=flat-square
[codecov]:       https://codecov.io/github/css-modules/postcss-modules-local-by-default?branch=master

---
_Source: https://npm.io/package/@jtmi/postcss-modules-local-by-default · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
