> For the complete documentation index, see [llms.txt](https://bryan-guner.gitbook.io/my-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bryan-guner.gitbook.io/my-docs/redux/repos/examples/real-world/node_modules/postcss-safe-parser.md).

# PostCSS Safe Parser

![](http://postcss.github.io/postcss/logo.svg)

A fault-tolerant CSS parser for [PostCSS](https://github.com/postcss/postcss), which will find & fix syntax errors, capable of parsing any input. It is useful for:

* Parse legacy code with many hacks. For example, it can parse all examples from [Browserhacks](http://browserhacks.com/).
* Works with demo tools with live input like [Autoprefixer demo](http://simevidas.jsbin.com/gufoko/quiet).

[![Sponsored by Evil Martians](https://evilmartians.com/badges/sponsored-by-evil-martians.svg)](https://evilmartians.com/?utm_source=postcss)

## Usage

```js
var safe   = require('postcss-safe-parser');
var badCss = 'a {';

postcss(plugins).process(badCss, { parser: safe }).then(function (result) {
    result.css //= 'a {}'
});
```
