# icss-replace-symbols

> Replacing symbols during the linking phase of ICSS

Latest version **1.1.0** (published 2017-05-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install icss-replace-symbols
pnpm add icss-replace-symbols
yarn add icss-replace-symbols
bun add icss-replace-symbols
```

## 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.1.0 |
| Published | 2017-05-21 |
| First published | 2015-09-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Glen Maddern |
| Maintainers | geelen |
| Keywords | css, modules, icss, postcss |

## Links

- npm: https://www.npmjs.com/package/icss-replace-symbols
- Repository: https://github.com/css-modules/icss-replace-symbols
- Homepage: https://github.com/css-modules/icss-replace-symbols#readme
- Issues: https://github.com/css-modules/icss-replace-symbols/issues
- npm.io page: https://npm.io/package/icss-replace-symbols

## 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.1.0 (latest) — 2017-05-21
- 1.0.2 — 2015-10-19
- 1.0.1 — 2015-09-19
- 1.0.0 — 2015-09-19

## README

[![Build Status](https://img.shields.io/travis/css-modules/icss-replace-symbols/master.svg?style=flat-square)]()

# ICSS — Replace Symbols

Governs the way tokens are searched & replaced during the linking stage of ICSS loading.

This is broken into its own module in case the behaviour needs to be replicated in other PostCSS plugins (i.e. [CSS Modules Constants](https://github.com/css-modules/postcss-modules-constants))

## API

```js
import replaceSymbols from "icss-replace-symbols"
replaceSymbols(css, translations)
```

Where:

- `css` is the PostCSS tree you're working with
- `translations` is an JS object of `symbol: "replacement"` pairs, where all occurrences of `symbol` are replaced with `replacement`.

## Behaviour

A symbol is a string of alphanumeric, `-` or `_` characters. A replacement can be any string. They are replaced in the following places:

- In the value of a declaration, i.e. `color: my_symbol;` or `box-shadow: 0 0 blur spread shadow-color`
- In a media expression i.e. `@media small {}` or `@media screen and not-large {}`

## License

ISC

---
Glen Maddern, 2015.

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