From 2bde30337b66b107ea9419b283fc9caa35f27fe0 Mon Sep 17 00:00:00 2001 From: Ludovico Fischer <43557+ludofischer@users.noreply.github.com> Date: Sat, 10 Apr 2021 16:43:25 +0200 Subject: [PATCH] docs: add cssnano 5 release notes (#1021) --- site/blog/2021-03-31-cssnano-5.md | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 site/blog/2021-03-31-cssnano-5.md diff --git a/site/blog/2021-03-31-cssnano-5.md b/site/blog/2021-03-31-cssnano-5.md new file mode 100644 index 000000000..f7c0bd63b --- /dev/null +++ b/site/blog/2021-03-31-cssnano-5.md @@ -0,0 +1,36 @@ +--- +slug: cssnano-5-release-notes +title: cssnano 5 release +--- + +We have released a new version of cssnano. + +## Major changes + +* requires Node >= 10.13 +* PostCSS 8 API, so cssnano 5 does not emit warnings when running under PostCSS 8 +* updated to SVGO 2, fixing many SVG minification bugs +* updated css-value-parser and css-selector-parser, fixing many bugs + +### Upgrade notes +If you use the cssnano JavaScript API, you need to change your code: + +* Replace `cssnano.process()` with `cssnano().process()` (notice the `()` after `cssnano`) + +* cssnano specific options go into the options go to cssnano instead of process + +``` +cssnano(cssnanoOptions).process(postcssOptions) +``` + +## Bug fixes + +* fix improperly discarding `@font-face` declarations [#726](https://github.com/cssnano/cssnano/issues/726) +* partially fix some isues where cssnano did not combine rules when used together with `postcss-nested` [#1004](https://github.com/cssnano/cssnano/issues/1004) +* fix `translate3d()` minification [#920](https://github.com/cssnano/cssnano/issues/920) +* fix minification of values starting with `e` [#589](https://github.com/cssnano/cssnano/issues/958), [#984](https://github.com/cssnano/cssnano/issues/984) +* fix minification of percentage vaalues [#962](https://github.com/cssnano/cssnano/issues/962), [#957](https://github.com/cssnano/cssnano/issues/957) +* fix minification of `aspect-ratio` [#963](https://github.com/cssnano/cssnano/issues/963) +* fix merging of `@supports` rules [#974](https://github.com/cssnano/cssnano/issues/974) +* fix sorting of longhand and shorthand properties [#535](https://github.com/cssnano/cssnano/issues/535) +* remove vulnerable dependency and always warn with bad SVG input [#1034](https://github.com/cssnano/cssnano/pull/1034)