npm / postcss
postcss
What changed in postcss 6 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-27.
12 breaking3 security1 deprecations7 new APIs and options5 performance1 behavior and defaults1 tooling48 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpostcss 862 changes
Breaking changes 6
Source maps are no longer loaded unless opts.from is provided, preventing potentially unsafe source-map loading.
Previous source maps are restricted to the opts.from folder for security reasons.
The npm package now ships ES6+ sources without Babel compilation; client-side bundles targeting old browsers may need to run Babel on node_modules/postcss.
Support for Node.js 6.x, 8.x, 11.x, and 13.x was dropped because those versions no longer receive security updates.
Plugins and runners must declare postcss in peerDependencies.
The rarely used postcss.vendor API was removed.
Security 3
Fixed prototype hijacking when using postcss.fromJSON().
PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments
PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
New APIs and options 4
Set unsafeMap to true to disable the previous source maps folder restriction.
Added opts.unsafeMap to disable checks.
CSS custom properties and Sass-like
$variables now receive a special variable mark.A new plugin API lets plugins share a single CSS-tree scan, revisit changed nodes, and reduce duplicate PostCSS dependencies and plugin-order compatibility issues.
Performance 4
Declaration parsing performance was fixed, improving how PostCSS processes declarations.
Improved performance when parsing nested brackets.
Speeds up source map encoding parsing when an error occurs.
Improved performance when cleaning source map annotations.
Tooling 1
PostCSS now has first-class TypeScript support, with separate type files and fixes to type issues.
Fixes and other changes 44
Fixed empty source in CssSyntaxError on long lines.
Fixed the types for Declaration#important.
Fixed line breaks when removing a source map annotation.
Fixed parsing of unquoted url() when /* follows a comma.
Fixed parsing of url (…) when there is a space before the bracket.
Fixed parsing of unquoted uppercase URL().
Fixed final-word lookup when source offsets are absent.
Fixed Promise semantics in LazyResult#finally().
Fixed Input#origin() when opts.from is absent.
Fixed handling of an explicit start in Warning#toString().
Fixes source maps for escaped </style> tags.
Fixes broken source maps caused by escaping </style> in CSS.
Comments are now supported when using list.comma() and list.space().
Improved escaping of closing style tags.
Fixes a types regression.
Fixed removing comments starting with /*#.
Fixed handling of the * hack before a comment in Custom Properties.
Fixed Chinese text displayed in a deprecation warning.
Fixed empty values appearing in the middle of comma-separated lists.
Fixed handling of whitespace-only values in space-separated lists.
Fixed a rule's end position when a space appears before a semicolon.
Fixed type definitions.
Fixed a regression in list.split().
Source map loading now tracks symlinks in path protection.
Fixed list.split for non-string values.
Fixed a regression affecting visitors introduced in 8.5.17.
Preserves the BOM after processing.
Fixed custom properties losing their semicolon before a comment.
Fixed childless at-rules losing their semicolon before a comment during processing.
Fixed a missing space when AtRule#params is set after.
Fixed a mixing AST error that occurred on warnings.
Fixed cleaning before for new nodes inserted to Root.
Fixed Input#origin() behavior for unmapped end positions.
Fixed an error that could exceed the maximum call stack size.
Fixed the position returned by Input#origin.
Fixed putting a parent-less node in nodes of a new node.
Fixed computing offset in positionBy().
Fixed rangeBy() when index is 0.
Fixed raws after rehydrating a JSON AST.
Fixed a regression affecting custom syntax.
Fixed a command regression in postcss-scss.
Fixed Processor#version so it works correctly for developers using the API.
The parser now correctly handles rare valid CSS edge cases; custom-property values such as
{ border-radius: 8px }parse as a Declaration value.Node#origin() now returns position.url in addition to position.file for compatibility with absolute URLs in source map sources.
postcss 74 changes
Breaking changes 1
PostCSS no longer supports Node.js 4 or Node.js 9 because they no longer receive security updates.
Behavior and default changes 1
PostCSS now warns when called without plugins and syntax options.
Fixes and other changes 2
Errors during a Container#walk() circle now show the CSS node that caused the error in the stack trace.
LazyResult gained a finally method to make it compatible with the latest Promise API.
postcss 612 changes
Breaking changes 5
All methods deprecated since PostCSS 4.0 were removed.
Insert methods no longer clone nodes that already have a parent; they remove the inserted node from its previous parent.
Returns an exact copy of a node and no longer cleans
raws.PostCSS dropped Node.js 0.12 support; update Node.js to 4.0 or 7.0.
Separates process options from plugin options in the shortcut; pass plugin options as the third argument.
Deprecations 1
Deprecated because regular insert methods now have the same move behavior.
New APIs and options 3
Adds a shortcut similar to the DOM API for inserting a node after another node.
Adds a shortcut similar to the DOM API for inserting a node before another node.
Rule nodes expose their own semicolon through
Rule#raws.ownSemicolon.
Performance 1
Parser and tokenizer work together and keep only a few of the latest tokens in memory, reducing memory use on large CSS files.
Fixes and other changes 2
The parser now handles the native CSS mixin
@applycase where PostCSS 5.0 could lose the semicolon after a mixin definition.Fixes the error message produced for a single
:in CSS.