This project adheres to Semantic Versioning.
- Fix
import
support in TypeScript (by Remco Haszing).
- Reverted
package.exports
Node.js 15 fix.
- Fixed Node.js 15 warning (by 沈鸿飞).
- Fixed TypeScript definition (by Arthur Petrie).
- Added
package.types
.
- Fixed API docs (by Arthur Petrie).
- Improved plugin guide (by Yunus Gaziev).
- Prepared code base for Deno support (by Oscar Otero).
- Updated funding link.
- Added
Once
andOnceExit
events. - Fixed
Root
andRootExit
events re-visiting. - Fixed node re-visiting on deep children changes.
- Added docs for visitor API events.
- Replace prototype in PostCSS 7 nodes instead of recreating them.
- Added missed
Transformer
to exported types (by Pierre-Marie Dartus).
- Fix
8.0.7
regression on PostCSS 7 nodes converting (by Adam Wathan).
- Fixed compatibility issue with mixin AST with PostCSS 7 and 8 nodes.
- Added migration guide translation to Chinese to the warning.
- Fixed child adding methods in
Container
.
- Update changelog.
- Fixed
Cannot read property 'line' of null
error. - Fixed source map support for declarations.
- Fixed client-side bundling support.
- Fixed plugin packs support.
- Updated
Processor#version
.
- Removed support for Node.js 6.x, 8.x, 11.x, and 13.x versions.
- Removed
postcss.vendor
helpers. - Deprecated
postcss.plugin()
API. - Treats
sourceMap.sources
as URL instead of file path. - Plugins and runners must have
postcss
inpeerDependencies
. - Prohibited to extend PostCSS AST classes.
- Moved from JSDoc to TypeDoc.
- Moved unknown source from counter to random IDs.
- Added visitor API for plugins (by Alexey Bondarenko).
- Added ES modules support.
- Added named exports for public classes
const { Rule } = require('postcss)
. - Added
position.url
toNode#origin()
result. - Added
opts.maps.absolute = true
option. - Added
opts.maps.annotation = (file, root) => url
option support. - Added
Node#source.offset
(by Ayaz Zaynutdinov). - Added
Declaration#variable
. - Added JSON source map support.
- Added index source map support.
- Added
Declaration#value
auto-converting to string. - Fixed parsing
{}
in at-rule parameters. - Fixed parsing empty Custom Properties.
--foo: ;
will have - Fixed building PostCSS with Rollup (by MapGrid).
- Fixed TypeScript types.
- Fixed source map relative paths.
- Fixed calling
replaceWith
with input replaced node (by Joseph Kaptur). - Improved “Writing a PostCSS Plugin” docs (by Alexey Bondarenko).
- Removed Babel from the project’s release process.
- Removed docs from npm package.
- Replaced
chalk
tocolorette
.
- Add migration guide link to PostCSS 8 error text.
- Fix compatibility with
postcss-scss
2.
- Add error message for PostCSS 8 plugins.
- Fix error message (by @admosity).
- Use only the latest source map annotation (by Emmanouil Zoumpoulakis).
- Fix TypeScript definition (by Natalie Weizenbaum).
- Update
Processor#version
.
- Fix TypeScript definition (by Natalie Weizenbaum).
- Fix TypeScript definition (by Natalie Weizenbaum).
- Fix TypeScript definition (by Natalie Weizenbaum).
- Fix absolute path support for Windows (by Tom Raviv).
- Fix TypeScript definition (by Keith Cirkel).
- Update
Processor#version
.
- Add funding link for
npm fund
.
- Revert passing
nodes
property to node constructor.
- Allow to pass PostCSS’s nodes in
nodes
property to node constructor.
- Fix passing
nodes
property to node constructor.
- Fix TypeScript type definitions (by Jan Buschtöns).
- Fix TypeScript type definitions (by Bob Matcuk and Jan Buschtöns).
- Revert Custom Properties fix until PostCSS 8.0.
- Fix Custom Properties support (by Ivan Solovev).
- Fix tokenizer for
postcss-less
(by Matt Lyons).
- Fix parsing regression in 7.0.12 for comments between property and value.
- Fix parsing broken CSS with two words in declaration property.
- Fix source maps on declaration semicolon (by Niklas Mischkulnig).
- Fix source maps (by Niklas Mischkulnig).
- Increase stringifing performance for non-raws AST.
- Fix TypeScript definitions (by Ankur Oberoi).
- Use
support-colors
6.0.
- Extend
Error
inCssSyntaxError
.
- Fix parsing files with BOM (by Veniamin Krol).
- Reduce npm package size (by Gilad Peleg).
- Fix safe parser regression.
- Fix tokenizer extendability (by Andrew Powell).
- Reduce npm package size.
- Fix warning text (by Rui Pedro M Lima).
- Fix JSDoc (by Steven Lambert).
- Remove Node.js 9 and Node.js 4 support.
- Remove IE and “dead” browsers support for client-side Babel transpiling.
- Add CSS position on error happened inside
walk()
(by Nikhil Gaba). - Add
LazyResult#finally
(by Igor Kamyshev). - Add warning on calling PostCSS without plugins and syntax options.
- Reduce client-side size.
- Fix parsing nested at-rules without semicolon, params, and spaces.
- Fix docs (by Kevin Schiffer and Pat Cavit).
- Fix
Node#prev
andNode#next
on missed parent.
- Rename Chinese docs to fix
yarnpkg.com
issue.
- Better error message on
null
as input CSS.
- Fix TypeScript definitions for source maps (by Oleh Kuchuk).
- Fix
source
field in TypeScript definitions (by Sylvain Pollet-Villard).
- Use primitive object in TypeScript definitions (by Sylvain Pollet-Villard).
- Fix parsing comment in selector between word tokens (by Oleh Kuchuk).
- Fix warning text (by Michael Keller).
- Add warning about missed
from
option onprocess().then()
call. - Add IE 10 support.
- Fix TypeScript definitions (by Jed Mao).
- Fix TypeScript definitions for case of multiple PostCSS versions
in
node_modules
(by Chris Eppstein). - Use
source-map
0.6.
- Don’t copy
*
hack to declaration indent.
- Add upper case
!IMPORTANT
support.
- Reduce PostCSS size in webpack bundle.
- Improve error message for plugin with old PostCSS (by Igor Adamenko).
- Fix Node.js 4.2.2 support.
- Fix base64 decoding for old Node.js and browser.
- Fix
end
position in at-rule without semicolon (by Oleh Kuchuk).
- Move Babel config from
package.json
fornode_modules
compiling cases.
- Fix parsing
;;
after rules. - Use Chalk 2.0.
- Fix escape sequences parsing (by Oleh Kuchuk).
- Added ability to force disable colors with an environment variable.
- Improved color detection of some terminal apps.
- Keep
raws.before
on movingRoot
children to newRoot
.
- Fix parser extensibility to use it in Safe Parser.
- Remove node.js 0.12 support.
- Remove deprecated method from PostCSS 4.
- Insert methods remove child from previous parent, instead of closing.
- Insert methods and cloning doesn’t clean
raws
anymore. - Methods
moveTo
,moveAfter
,moveBefore
were deprecated. - Options was changed in
Plugin#process(css, processOptions, pluginOptions)
. - Add stream parser to reduce memory usage (by Oleh Kuchuk).
- Add
before()
/after()
shortcuts fornode.parent.insertBefore(node, x)
. - Add
Rule#raws.ownSemicolon
for semicolon after templates for@apply
. - Use
babel-preset-env
to compile npm package. - Remove
js-base64
from dependencies (by Roman Dvornov). - Fix error message on single
:
in CSS. - Move tests to Jest.
- Clean up test (by Gabriel Kalani).
- Fix TypeScript definitions for case of multiple PostCSS versions
in
node_modules
(by Chris Eppstein).
- Add
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 JSDoc (by Dmitry Semigradsky).
- Fix typo in deprecation message (by Garet McKinley).
- Fix TypeScript definitions (by Jed Mao).
- Fix TypeScript definitions (by Jed Mao).
- Update TypeScript definitions (by Jed Mao).
- Fix error message (by Ben Briggs).
- Better error message on syntax object in plugins list.
- Fix
postcss.vendor
for values with spaces (by 刘祺).
- Better error message on unclosed string (by Ben Briggs).
- Improve terminal CSS syntax highlight (by Simon Lydell).
- Better color highlight in syntax error code frame.
- Fix color highlight support in old systems.
- Update
Processor#version
.
- Fix source map path for CSS without
from
option (by Michele Locati).
- Add syntax highlight to code frame in syntax error (by Andrey Popp).
- Use Babel code frame style and size in syntax error.
- Add
[
and]
tokens to parse[attr=;] {}
correctly. - Add
ignoreErrors
options to tokenizer (by Andrey Popp). - Fix error position on tab indent (by Simon Lydell).
- Suggests SCSS/Less parsers on parse errors depends on file extension.
- Fix TypeScript definitions (by Efremov Alexey).
- Add URI in source map support (by Mark Finger).
- Add
map.from
option (by Mark Finger). - Add
<no source>
mappings for nodes without source (by Bogdan Chadkin). - Add function value support to
map.prev
option (by Chris Montoro). - Add declaration value type check in shortcut creating (by 刘祺).
Result#warn
now returns new created warning.- Don’t call plugin creator in
postcss.plugin
call. - Add source maps to PostCSS ES5 build.
- Add JSDoc to PostCSS classes.
- Clean npm package from unnecessary docs.
- Fix support with input source mao with
utf8
encoding name.
- Fix between raw value parsing (by David Clark).
- Update TypeScript definitions (by Jed Mao).
- Clean fake node.source after
append(string)
.
- Fix indent-based syntaxes support.
- Parse new lines according W3C CSS syntax specification.
- Fix options argument in
Node#warn
(by Ben Briggs). - Fix TypeScript definitions (by Jed Mao).
- Fix CSS syntax error position on unclosed quotes.
- Fix
Node#clone()
onnull
value somewhere in node.
- Allow to use PostCSS in webpack bundle without JSON loader.
- Fix
index
andword
options inWarning#toString
(by Bogdan Chadkin). - Fix input source content loading in errors.
- Fix map options on using
LazyResult
as input CSS. - 100% test coverage.
- Use Babel 6.
- Allow passing a previous map with no mappings (by Andreas Lind).
- 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.
- PostCSS now requires that node 0.12 is installed via the engines property in package.json (by Howard Zuo).
- Fix parsing nested at-rule without semicolon (by Matt Drake).
- Trim
Declaration#value
(by Bogdan Chadkin).
- Fix multi-tokens property parsing (by Matt Drake).
- Fix start position in
Root#source
. - Fix source map annotation, when CSS uses
\r\n
(by Mohammad Younes).
- Fix
url()
parsing. - Fix using
selectors
inRule
constructor. - Add start source to
Root
node.
- Fix
remove(index)
to be compatible with 4.x plugin.
- Fix PostCSS 4.x plugins compatibility.
- Fix type definition loading (by Jed Mao).
- Remove
safe
option. Move Safe Parser to separate project. Node#toString
does not includebefore
for root nodes.- Remove plugin returning
Root
API. - Remove Promise polyfill for node.js 0.10.
- Deprecate
eachInside
,eachDecl
,eachRule
,eachAtRule
andeachComment
in favor ofwalk
,walkDecls
,walkRules
,walkAtRules
andwalkComments
(by Jed Mao). - Deprecate
Container#remove
andNode#removeSelf
in favor ofContainer#removeChild
andNode#remove
(by Ben Briggs). - Deprecate
Node#replace
in favor ofreplaceWith
(by Ben Briggs). - Deprecate raw properties in favor of
Node#raws
object. - Deprecate
Node#style
in favor ofraw
. - Deprecate
CssSyntaxError#generated
in favor ofinput
. - Deprecate
Node#cleanStyles
in favor ofcleanRaws
. - Deprecate
Root#prevMap
in favor ofRoot.source.input.map
. - Add
syntax
,parser
andstringifier
options for Custom Syntaxes. - Add stringifier option to
Node#toString
. - Add
Result#content
alias for non-CSS syntaxes. - Add
plugin.process(css)
shortcut to every plugin function (by Ben Briggs). - Add multiple nodes support to insert methods (by Jonathan Neal).
- Add
Node#warn
shortcut (by Ben Briggs). - Add
word
andindex
options to errors and warnings (by David Clark). - Add
line
,column
properties toWarning
. - Use
supports-color
library to detect color support in error output. - Add type definitions for TypeScript plugin developers (by Jed Mao).
Rule#selectors
setter detects separators.- Add
postcss.stringify
method. - Throw descriptive errors for incorrectly formatted plugins.
- Add docs to npm release.
- Fix
url()
parsing. - Fix Windows support (by Jed Mao).
- Fix errors without stack trace.
- Allow asynchronous plugins to change processor plugins list (by Ben Briggs).
- Fix for plugins packs defined by
postcss.plugin
.
- Fix input inlined source maps with UTF-8 encoding.
- Update Promise polyfill.
- Fix error message on wrong plugin format.
- Fix Promise behavior on sync plugin errors.
- Automatically fill
plugin
field inCssSyntaxError
. - Fix warning message (by Ben Briggs).
- Speed up
node.clone()
.
- Accepts
Processor
instance inpostcss()
constructor too.
- Speed up
postcss.list
(by Bogdan Chadkin).
- Fix Promise behavior on parsing error.
- Parse at-words in declaration values.
- Fix Promise polyfill dependency (by Anton Yakushev and Matija Marohnić).
- Add Promise polyfill for node.js 0.10 and IE.
- List helpers can be accessed independently
var space = postcss.list.space
.
- Show deprecated message only once.
- Asynchronous plugin support.
- Add warnings from plugins and
Result#messages
. - Add
postcss.plugin()
to create plugins with a standard API. - Insert nodes by CSS string.
- Show version warning message on error from an outdated plugin.
- Send
Result
instance to plugins as the second argument. - Add
CssSyntaxError#plugin
. - Add
CssSyntaxError#showSourceCode()
. - Add
postcss.list
andpostcss.vendor
aliases. - Add
Processor#version
. - Parse wrong closing bracket.
- Parse
!important
statement with spaces and comments inside (by Ben Briggs). - Throw an error on declaration without
prop
orvalue
(by Philip Peterson). - Fix source map mappings position.
- Add indexed source map support.
- Always set
error.generated
. - Clean all source map annotation comments.
- Remove
babel
from released package dependencies (by Andres Suarez).
- Fix error message on double colon in declaration.
- Fix indent detection in some rare cases.
- Faster API with 6to5 Loose mode.
- Fix indexed source maps support.
- Do not copy IE hacks to code style.
- Add
source.input
toRoot
too.
- Rename
Container#childs
tonodes
. - Rename
PostCSS#processors
toplugins
. - Add
Node#replaceValues()
method. - Add
Node#moveTo()
,moveBefore()
andmoveAfter()
methods. - Add
Node#cloneBefore()
andcloneAfter()
shortcuts. - Add
Node#next()
,prev()
androot()
shortcuts. - Add
Node#replaceWith()
method. - Add
Node#error()
method. - Add
Container#removeAll()
method. - Add filter argument to
eachDecl()
andeachAtRule()
. - Add
Node#source.input
and movesource.file
orsource.id
toinput
. - Change code indent, when node was moved.
- Better fix code style on
Rule
,AtRule
andComment
nodes changes. - Allow to create rules and at-rules by hash shortcut in append methods.
- Add class name to CSS syntax error output.
- Fix IE filter parsing with multiple commands.
- Safer way to consume PostCSS object as plugin (by Maxime Thirouin).
- Fix missing semicolon when comment comes after last declaration.
- Fix Safe Mode declaration parsing on unclosed blocks.
- Fix parser to support difficult cases with backslash escape and brackets.
- Add
CssSyntaxError#stack
(by Maxime Thirouin).
- Fix Safe Mode on unknown word before declaration.
- Increase tokenizer speed (by Roman Dvornov).
- Fix empty comment parsing.
- Fix
Root#normalize
in some inserts.
- Fix Rhino JS runtime support.
- Typo in deprecated warning (by Maxime Thirouin).
- New parser, which become the fastest ever CSS parser written in JavaScript.
- Parser can now parse declarations and rules in one parent (like in
@page
) and nested declarations for plugins likepostcss-nested
. - Child nodes array is now in
childs
property, instead ofdecls
andrules
. map.inline
andmap.sourcesContent
options are nowtrue
by default.- Fix iterators (
each
,insertAfter
) on children array changes. - Use previous source map to show origin source of CSS syntax error.
- Use 6to5 ES6 compiler, instead of ES6 Transpiler.
- Use code style for manually added rules from existing rules.
- Use
from
option from previous source mapfile
field. - Set
to
value tofrom
ifto
option is missing. - Use better node source name when missing
from
option. - Show a syntax error when
;
is missed between declarations. - Allow to pass
PostCSS
instance or list of plugins touse()
method. - Allow to pass
Result
instance toprocess()
method. - Trim Unicode BOM on source maps parsing.
- Parse at-rules without spaces like
@import"file"
. - Better previous
sourceMappingURL
annotation comment cleaning. - Do not remove previous
sourceMappingURL
comment onmap.annotation: false
. - Parse nameless at-rules in Safe Mode.
- Fix source map generation for nodes without source.
- Fix next child
before
ifRoot
first child got removed.
- Fix map generation for nodes without source (by Josiah Savary).
- Fix source map with BOM marker support (by Mohammad Younes).
- Fix source map paths (by Mohammad Younes).
- Fix
prepend()
on emptyRoot
.
- Allow to use object shortcut in
use()
with functions likeautoprefixer
.
- Add shortcut to set processors in
use()
via object with.postcss
property.
- Send
opts
fromProcessor#process(css, opts)
to processors.
- Use GNU style syntax error messages.
- Add
Node#replace
method. - Add
CssSyntaxError#reason
property.
- Fix UTF-8 support in inline source map.
- Fix source map
sourcesContent
if there is nofrom
andto
options.
- Allow to miss
to
andfrom
options for inline source maps. - Add
Node#source.id
if file name is unknown. - Better detect splitter between rules in CSS concatenation tools.
- Automatically clone node in insert methods.
- Change Traceur ES6 compiler to ES6 Transpiler.
- Show broken CSS line in syntax error.
- Project was rewritten from CoffeeScript to ES6.
- Add Safe Mode to works with live input or with hacks from legacy code.
- More safer parser to pass all hacks from Browserhacks.com.
- Use real properties instead of magic getter/setter for raw properties.
- Save previous source map for each node to support CSS concatenation with multiple previous maps.
- Add
map.sourcesContent
option to add origin content tosourcesContent
inside map. - Allow to set different place of output map in annotation comment.
- Allow to use arrays and
Root
inContainer#append
and same methods. - Add
Root#prevMap
with information about previous map. - Allow to use latest PostCSS from GitHub by npm.
Result
now is lazy and it will generate output CSS only if you usecss
ormap
property.- Use separated
map.prev
option to set previous map. - Rename
inlineMap
option tomap.inline
. - Rename
mapAnnotation
option tomap.annotation
. Result#map
now returnSourceMapGenerator
object, instead of string.- Run previous map autodetect only if input CSS contains annotation comment.
- Add
map: 'inline'
shortcut formap: { inline: true }
option. Node#source.file
now will contains absolute path.- Clean
Declaration#between
style on node clone.
- Allow to use
Root
orResult
as first argument inprocess()
. - Save parsed AST to
Result#root
.
- Better space symbol detect to read UTF-8 BOM correctly.
- Remove source map hacks by using new Mozilla’s
source-map
(by Simon Lydell).
- Add URI encoding support for inline source maps.
- Fix relative paths from previous source map.
- Safer space split in
Rule#selectors
(by Simon Lydell).
- Add
Comment
node for comments between declarations or rules. - Add source map annotation comment to output CSS.
- Allow to inline source map to annotation comment by data:uri.
- Fix source maps on Windows.
- Fix source maps for subdirectory (by Dmitry Nikitenko and Simon Lydell).
- Autodetect previous source map.
- Add
first
andlast
shortcuts to container nodes. - Parse
!important
to separated property inDeclaration
. - Allow to break iteration by returning
false
. - Copy code style to new nodes.
- Add
eachInside
method to recursively iterate all nodes. - Add
selectors
shortcut to get selectors array. - Add
toResult
method toRule
to simplify work with several input files. - Clean declaration’s
value
, rule’sselector
and at-rule’sparams
by storing spaces inbetween
property.
- Add source map support.
- Add shortcuts to create nodes.
- Method
process()
now returns object withcss
andmap
keys. - Origin CSS file option was renamed from
file
tofrom
. - Rename
Node#remove()
method toremoveSelf()
to fix name conflict. - Node source was moved to
source
property with origin file and node end position. - You can set own CSS generate function.
- Initial release.