# @salesforce-ux/postcss-annotations-parser

> PostCSS plugin to parse annotation comments such as `@css-var-fallback`.

Latest version **0.1.1** (published 2020-11-13) · SEE LICENSE file license · 0 weekly downloads

## Install

```sh
npm install @salesforce-ux/postcss-annotations-parser
pnpm add @salesforce-ux/postcss-annotations-parser
yarn add @salesforce-ux/postcss-annotations-parser
bun add @salesforce-ux/postcss-annotations-parser
```

## 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 | 2020-11-13 |
| First published | 2020-11-13 |
| Weekly downloads | 0 |
| License | SEE LICENSE file |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 1 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Salesforce |
| Maintainers | salesforce-ux |
| Keywords | postcss, css, postcss-plugin, annotations, css variables, custom properties, fallback, Salesforce |

## Links

- npm: https://www.npmjs.com/package/@salesforce-ux/postcss-annotations-parser
- Repository: https://github.com/salesforce-ux/postcss-annotations-parser
- Homepage: https://github.com/salesforce-ux/postcss-annotations-parser#readme
- Issues: https://github.com/salesforce-ux/postcss-annotations-parser/issues
- npm.io page: https://npm.io/package/@salesforce-ux/postcss-annotations-parser

## Dependencies (1)

- [postcss](https://npm.io/package/postcss.md) ^7.0.18

## 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) — 2020-11-13

## README

# PostCSS Annotations Parser

> *NOTICE:* This plugin is provided as-is without support, implied or otherwise.

[PostCSS] plugin to parse annotation comments such as `@css-var-fallback`

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

```css
.foo {
    /* Input example */

    /*! @css-var-fallback border-radius */
    --sds-c-avatar-radius-border: var(--sds-g-radius-border, 12%);
}
```

```css
.foo {
  /* Output example */

  border-radius: var(--sds-g-radius-border, 12%);
  --sds-c-avatar-radius-border: var(--sds-g-radius-border, 12%);
}
```



## Usage

Check you project for existed PostCSS config: `postcss.config.js`
in the project root, `"postcss"` section in `package.json`
or `postcss` in bundle config.

If you already use PostCSS, add the plugin to plugins list:

```diff
module.exports = {
  plugins: [
+   require('postcss-annotations-parser'),
    require('autoprefixer')
  ]
}
```

If you do not use PostCSS, add it according to [official docs]
and set this plugin in settings.

[official docs]: https://github.com/postcss/postcss#usage

### Options

* `preserve`: if set to false the plugin will not preserve the existing declaration and overwrite instead

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