NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #49 most downloaded on npm
Tool for transforming styles with JS plugins
Latest stable
8.5.33
Last release 3 days ago
13 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
297 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Better error message on null as input CSS.
null as input CSS.Fix TypeScript definitions for source maps (by @hzlmn).
source field in TypeScript definitions (by @sylvainpolletvillard).source field in TypeScript definitions (by Sylvain Pollet-Villard).Your coding agent can read these notes before it upgrades. Set up the MCP server →
Use primitive object in TypeScript definitions (by @sylvainpolletvillard).
Fix parsing comment in selector between word tokens (by @hzlmn).
Fix warning text (by @mhkeller).
Add warning about missed from option on process().then() call.
from option on process().then() call.Fix TypeScript definitions (by @jedmao).
Fix TypeScript definitions for case of multiple PostCSS versions in node_modules (by @chriseppstein).
node_modules (by @chriseppstein).source-map 0.6.node_modules (by Chris Eppstein).source-map 0.6.Don’t copy * hack to declaration indent.
* hack to declaration indent.Add upper case !IMPORTANT support.
!IMPORTANT support.Reduce PostCSS size in webpack bundle.
Improve error message for plugin with old PostCSS (by @igoradamenko).
- Fix Node.js 4.2.2 support.
Fix base64 decoding for old Node.js and browser.
Fix base64 decoding for old Node.js and browser.
Fix end position in at-rule without semicolon (by @hzlmn).
end position in at-rule without semicolon (by @hzlmn).Move Babel config from package.json for node_modules compiling cases.
package.json for node_modules compiling cases.* Fix parsing ;; after rules. * Use Chalk 2.0.
;; after rules.Fix escape sequences parsing (by @hzlmn).
Keep raws.before on moving Root children to new Root.
raws.before on moving Root children to new Root.Fix parser extensibility to use it in Safe Parser.
Now, moveTo, moveAfter & moveBefore are deprecated because regular insert methods have this move behavior.
<img src="https://cloud.githubusercontent.com/assets/19343/25771868/5c010f02-325d-11e7-9ab6-7e962eb3b601.png" align="right" width="200" height="200" alt="Marquis Orias seal">
PostCSS 6.0 drops support for Node.js 0.12, cleans the raws API, adds support for @apply, and uses less memory.
Node.js stopped 0.12 support in January 01. So PostCSS dropped Node.js 0.12 from all tests. Please update your Node.js version to 4.0 or 7.0.
In 6.0 we fixed our mistakes in API design. First, if node already had a parent, insert methods (append, insertAfter, etc) will not clone it anymore. In 6.0 inserts methods will remove inserted node from previous parent:
parent1.nodes.length //=> 3
parent2.append(parent1.nodes[0])
parent1.nodes.length //=> 2
Now, moveTo, moveAfter & moveBefore are deprecated because regular insert methods have this move behavior.
Also Node#clone now returns the exact copy of a node. In 6.0 it no longer cleans raws.
node.raws.before //=> "\n "
const clone = node.clone()
clone.raws.before //=> "\n "
Every PostCSS plugin has plugin.process shortcut. In 6.0 we split process and plugin options in this shortcut:
const plugin = postcss.plugin('postcss-awesome', colors => {
…
})
plugin.process(css, { from: 'app.css' }, colors).css
In the new major release, we finally remove all deprecated methods from PostCSS 4.0. It should not be a big problem because we show deprecated warnings for them for 2 years. Most of the plugins updated their API.
Since we removed deprecated methods from PostCSS 4.0, in 6.0 we were free to add before() and after() shortcuts, similar to DOM API methods.
node1.before(node2)
// is equal too
node1.parent.insertBefore(node1, node2)
Chrome 51 started to support “native CSS mixins” from @tabatkins spec under the flag:
:root {
--clearfix: {
display: table;
clear: both;
content: '';
};
}
.box:after{
@apply --clearfix;
}
PostCSS 5.0 could parse it pretty well, but in some cases, it lost the semicolon after a mixin definition. In PostCSS 6.0 parser we covered this case, and node rules have Rule#raws.ownSemicolon for their own semicolon.
In PostCSS 5.0 tokenizing and parsing were separated steps. As a result, we wrote all tokens into memory between steps. It worked well most of the time, but had a large memory usage when parsing really big CSS files (more than 25 MB).
In 6.0 @hzlmn rewrote parser, and now parser and tokenizer work together (stream parser). As a result, we put only a few of the latest tokens in memory. So 6.0 will use less memory.
We care about node_modules size problem. So in 6.0 @lahmatiy and @h0tc0d3 removed js-base64 dependency to use native Node.js and Browsers ways to base64 encoding.
Also, PostCSS was moved to babel-preset-env. Instead of regular babel, it will compile only necessary parts of ES6. So build in npm packages will be cleaner. Current browserslist config for babel-preset-env is last 1 version and node 4.
: in CSS.raws anymore.moveTo, moveAfter, moveBefore were deprecated.Plugin#process(css, processOptions, pluginOptions).before()/after() shortcuts for node.parent.insertBefore(node, x).Rule#raws.ownSemicolon for semicolon after templates for @apply.babel-preset-env to compile npm package.js-base64 from dependencies (by Roman Dvornov).: in CSS.Fix TypeScript definitions for case of multiple PostCSS versions in node_modules (by Chris Eppstein).
node_modules (by Chris Eppstein).Add postcss-sass suggestion to syntax error on .sass input.
postcss-sass suggestion to syntax error on .sass input.Better error on wrong argument in node constructor.
Fix TypeScript definitions (by @bumbleblym).
Fix browser bundle building in webpack (by @janschoenherr).
Do not add comment to important raws.
Fix typo in deprecation message (by @garetmckinley).
Fix TypeScript definitions (by @jedmao)
Fix TypeScript definitions (by @jedmao)
Update TypeScript definitions (by @jedmao).
Fix error message (by @ben-eb).
Better error message on syntax object in plugins list.
Fix postcss.vendor for values with spaces (by @gucong3000).
postcss.vendor for values with spaces (by @gucong3000).Better error message on unclosed string (by @ben-eb).
Improve terminal CSS syntax highlight (by @lydell).
Better color highlight in syntax error code frame.
- Update Processor#version.
Processor#version.Fix source map path for CSS without from option (by @mlocati).
PostCSS 5.2 contains parser fix and better syntax error output.
<img src="https://cloud.githubusercontent.com/assets/19343/18299903/feb559ce-7507-11e6-86af-b66ddfd55f21.jpg" align="right" width="200" height="200" alt="Duke Vapula seal">
PostCSS 5.2 contains parser fix and better syntax error output.
In previous versions syntax errors were very simple:
<img src="https://cloud.githubusercontent.com/assets/19343/18300129/c6faf4f6-7509-11e6-9223-2e4a4160b379.png" alt="PostCSS 5.1 syntax error" width="450" height="136">
@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:
<img src="https://cloud.githubusercontent.com/assets/19343/18300142/ef6ac9fc-7509-11e6-965e-d37d92bfe2b5.png" alt="PostCSS 5.2 syntax error" width="450" height="174">
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 }'))
PostCSS 5.2 has new [ and ] tokens to parse [attr=;] { } correctly.
[ and ] tokens to parse [attr=;] {} correctly.ignoreErrors options to tokenizer (by Andrey Popp).Suggests SCSS/Less parsers on parse errors depends on file extension.
Fix TypeScript definitions (by @lexich).
PostCSS 5.1 brings few improvements for source maps and JSDoc.
<img src="https://cloud.githubusercontent.com/assets/19343/16774629/94ad9de4-4865-11e6-994e-4b22facbbb3c.jpg" align="right" width="200" height="200" alt="King and President Zagan seal">
PostCSS 5.1 brings few improvements for source maps and JSDoc.
@markfinger improved source map support for new cases. He added absolute URI support in from/to options and added new map.from options for better control.
Some plugin developers forget to set correct Node#source for nodes. @TrySound add some help for developers. Now PostCSS will set <no source> source for sourceless nodes.
@montmanu add function value support for map.prev option.
We moved all API docs close to source and now PostCSS has JSDoc comments for every public method and property.
I hope it will make plugin development easy: API docs become better and some IDE will show docs in autocomplete.
You can check latest API on api.postcss.org.
Result#warn now returns new created warning.postcss.plugin call.map.from option (by Mark Finger).<no source> mappings for nodes without source (by Bogdan Chadkin).map.prev option (by Chris Montoro).Result#warn now returns new created warning.postcss.plugin call.Fix support with input source map with utf8 encoding name.
utf8 encoding name.Fix between raw value parsing (by @davidtheclark)
append(string).append(string).Fix indent-based syntaxes support.
Parse new lines according W3C CSS syntax specification.
Fix options argument in Node#warn (by @ben-eb).
Node#warn (by @ben-eb).Node#warn (by Ben Briggs).Fix CSS syntax error position on unclosed quotes.
Fix Node#clone() on null value somewhere in node.
Node#clone() on null value somewhere in node.Allow to use PostCSS in webpack bundle without JSON loader.
Fix index and word options in Warning#toString (by @TrySound).
index and word options in Warning#toString (by @TrySound).LazyResult as input CSS.index and word options in Warning#toString (by Bogdan Chadkin).LazyResult as input CSS.Allow passing a previous map with no mappings (by @papandreou).
Increase plugins performance by 1.5 times.
Fix warning from nodes without source.
Fix source map type detection (by @asan).
Fixed a missed step in 5.0.7 that caused the module to be published as ES6 code.
5.0.7 that caused the module to be published as ES6 code.PostCSS now requires that node 0.12 is installed via the engines property in package.json (by @leftstick).
engines property in package.json (by @leftstick).Fix parsing nested at-rule without semicolon (by @mahtd).
Declaration#value (by @TrySound).Declaration#value (by Bogdan Chadkin).Fix multi-tokens property parsing (by @mahtd).
One column per quarter.