Skip to content

Releases: postcss/postcss

2.2.6

31 Oct 20:54
@ai ai
2.2.6
Compare
Choose a tag to compare
  • Fix map generation for nodes without source (by @josiahsavary).

2.2.5

24 Sep 20:55
@ai ai
2.2.5
Compare
Choose a tag to compare

2.2.4

01 Sep 17:55
@ai ai
2.2.4
Compare
Choose a tag to compare
  • Fix prepend() on empty Root.

2.2.3

27 Aug 23:22
@ai ai
2.2.3
Compare
Choose a tag to compare
  • Allow to use object shortcut in use() with functions like autoprefixer.

2.2.2

27 Aug 15:25
@ai ai
2.2.2
Compare
Choose a tag to compare
  • Add shortcut to set processors in use() via object with .postcss property.

2.2.1

22 Aug 12:33
@ai ai
2.2.1
Compare
Choose a tag to compare
  • Processors now receive options from process(css, opts) by @MoOx’s idea.

2.2 “Marquis Cimeies”

17 Aug 15:15
@ai ai
2.2.0
Compare
Choose a tag to compare

Marquis Cimeies seal

This release adds Node#replace() shortcut and uses GNU style for syntax error messages.

Replace Nodes

@jonathanong suggested good shortcut to replace one node to another (or several other nodes). For example, you can write @import loader:

css.eachAtRule(function (rule) {
    if ( rule.name != 'import' ) return;

    var file = readFileFromRule(rule);
    var content = fs.readFileSync(file);
    var root = postcss.parse(content, { from: file });

    rule.replace(root);
});

GNU Style for Syntax Errors

Old PostCSS’s errors was like Can't parse CSS: Unexpected { in decls at line 2:1 in a.css.

But GNU Coding Standards had good recommendations for syntax error messages. Rework, CoffeeScript and other tools already use it. Also some tools can find this format in output and they will open your text editor on this line.

PostCSS 2.2 now uses GNU style for syntax errors:

a.css:2:1 Unexpected { in decls

Also CssSyntaxError now has reason property to build your own error messages in end-user interfaces (in previous example it will be "Unexpected { in decls").

PostCSS Organization

PostCSS repository was moved to postcss GitHub organiztion, which will host official plugins.

2.1.2

08 Aug 19:39
@ai ai
2.1.2
Compare
Choose a tag to compare

@bclinkinbeard found several rare and interesting bugs. This release fix them.

  • Fix UTF-8 support in inline source map by using js-base64 instead of base64-js.
  • Fix source map sourcesContent if there is no from and to options.

2.1.1

06 Aug 21:56
@ai ai
2.1.1
Compare
Choose a tag to compare
  • Allow to miss to and from 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.

2.1 “King Amdusias”

27 Jul 09:29
@ai ai
2.1.0
Compare
Choose a tag to compare

King Amdusias seal

PostCSS 2.1 has new ES6 compiler and show syntax error source.

ES6 Transpiler

PostCSS 2.0 used Traceur to compile ES6 sources to pure JS. Traceur is very powerful, but require to add special runtime JS file to build. Runtime was very big, had side effects and some problems in Browserify and Rhino.

New PostCSS 2.1 uses ES6 Transpiler. It hasn’t runtime, doesn’t change system classes and very small and easy to use. Also it has line-to-line input/output mapping to make debug easier.

Source Line in Syntax Error

By @jonathanong idea CSS syntax error messages now include broken source line:

> postcss.parse('a {\n  b { }\n}')
Can't parse CSS: Unexpected { in decls at line 2:5
a {
  b { }
    ^
}

PostCSS will try to detect environment and use colors in error output if they are supported.

Logo

And now PostCSS has own logo. It is alchemist symbol of philosopher’s stone, which can process lead into gold.