github postcss/postcss 5.2.0
5.2 “Duke Vapula”

latest releases: 8.4.38, 8.4.37, 8.4.36...
7 years ago

Duke Vapula seal

PostCSS 5.2 contains parser fix and better syntax error output.

Syntax Errors

In previous versions syntax errors were very simple:

PostCSS 5.1 syntax error

@andreypopp did great work and now main webpack’s loaders have same output on syntax error. Unification is good, so we decided to use same output for PostCSS errors too.

First, we added line numbers to code frame. Then we increased lines count. @andreypopp added syntax highlight. And finally @lydell fix output for tab indent and some other edge cases.

So right now PostCSS syntax errors are similar to Babel and webpack errors:

PostCSS 5.2 syntax error

Highlight CSS

PostCSS 5.2 has CSS syntax highlight for syntax error. But you can use our highlighter in your terminal tool too:

const highlight = require('postcss/lib/terminal-highlight');
console.log(highlight('a { color: black }'))

Parser Fixes

PostCSS 5.2 has new [ and ] tokens to parse [attr=;] { } correctly.

Don't miss a new postcss release

NewReleases is sending notifications on new releases.