postcss-safe-parser (6.0.0)

Published 2026-02-24 14:03:20 +00:00 by atheaadmin

Installation

registry=
npm install postcss-safe-parser@6.0.0
"postcss-safe-parser": "6.0.0"

About this package

PostCSS Safe Parser

A fault-tolerant CSS parser for 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.
  • Works with demo tools with live input like Autoprefixer demo.
Sponsored by Evil Martians

Usage

const safe = require('postcss-safe-parser')

const badCss = 'a {'

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

Dependencies

Peer Dependencies

ID Version
postcss ^8.3.3

Keywords

css postcss postcss-syntax parser fault tolerant
Details
npm
2026-02-24 14:03:20 +00:00
1
Andrey Sitnik
MIT
latest
2.5 KiB
Assets (1)
Versions (1) View all
6.0.0 2026-02-24