Changelog

cssnano & its plugins have been upgraded to PostCSS 6.x. Please ensure that
for optimal results that you use cssnano with a PostCSS 6 compatible runner
& that any other plugins are also using PostCSS 6.

cssnano is now essentially a preset loader and does not contain any built-in
transforms (instead, it delegates to cssnano-preset-default by default).
Due to the new architecture, it's not possible to exclude asynchronous
transforms and run it synchronously, unlike in 3.x. Any transforms that
were "core" modules have now been extracted out into separate packages.

Because of the new preset system, cssnano will not accept any transformation
options; these must be set in the preset. The option names remain mostly the
same, except some cases where "core" modules have been extracted out:

core is now normalizeWhitespace.

reduceBackgroundRepeat is now normalizeRepeatStyle.

reduceDisplayValues is now normalizeDisplayValues.

reducePositions is now normalizePositions.

reduceTimingFunctions is now normalizeTimingFunctions.

styleCache is now rawCache.

When excluding transforms, we now have an exclude option (in 3.x this was
named disable). Similarly, the safe option was removed; the defaults
are now much less aggressive.

By default, the following transforms are no longer applied to any input CSS.
You may see an increased output file size as a result:

autoprefixer

postcss-discard-unused

postcss-merge-idents

postcss-reduce-idents

postcss-zindex

Note that you can load cssnano-preset-advanced instead which does contain
these transforms.

We no longer detect previous plugins to silently exclude our own, and now
consider this to be an anti-pattern. So postcss-filter-plugins was removed.

We also changed some options to make the default transforms safer:

postcss-minify-font-values: removeAfterKeyword set to false from true.

postcss-normalize-url: stripWWW set to false from true.

cssnano now does not accept the sourcemap shortcut option; please refer
to the PostCSS documentation on sourcemaps. The quickstart.js file included
with this module will give you a good starting point.

cssnano.process is no longer a custom method; we use the built-in process
method exposed on each PostCSS plugin. The new signature is
cssnano.process(css, postcssOpts, cssnanoOpts), in 3.x it was
cssnano.process(css, cssnanoOpts).

We dropped support for Node 0.12, now requiring at least Node 4.

Finally, cssnano is now developed as a monorepo, due to the fact that some
transforms have a lot of grey area/overlap. Due to this, some modules have
been refactored to delegate responsibility to others, such that duplication
of functionality is minimized. For instance, postcss-colormin will no
longer compress whitespace or compress numbers, as those are handled by
postcss-normalize-whitespace & postcss-convert-values respectively.

Due to the PostCSS 6 upgrade, we have been able to reduce usage of custom
methods, such as node clone behaviour. In cases where some utility
has been used by several plugins it is now a separate package, reducing
cssnano's footprint.

cssnano now makes much better use of Browserslist. postcss-colormin &
postcss-reduce-initial were enhanced with different behaviour depending
on which browsers are passed. And now, the footprint for the caniuse-db
dependency is much smaller thanks to caniuse-lite - 7 times smaller as
of this writing. This makes cssnano much faster to download from npm!

cssnano will no longer console.warn any messages when using deprecated
options; these are now sent to PostCSS. You will be able to see them if you
use a PostCSS runner with built-in messages support, or alternately by
loading postcss-reporter or postcss-browser-reporter in your plugins list.

Prepares support for grid identifier reduction by adding it to the list
of optimisations turned off when options.safe is set to true.

Adds support for normalizing unicode-range descriptors. Values will
be converted when the code matches 0 & f in the same place on both sides
of the range. So, u+2000-2fff can be converted to u+2???, but
u+2100-2fff will be left as it is.

Fixes an issue where using options.safe threw an error when cssnano was
not used as part of a PostCSS instance, but standalone (such as in modules
like gulp-cssnano). cssnano now renames safe internally to isSafe.

This release swaps postcss-single-charset for postcss-normalize-charset,
which can detect encoding to determine whether a charset is necessary.
Optionally, you can set the add option to true to prepend a UTF-8
charset to the output automatically (thanks to @TrySound).

A safe option was added, which disables more aggressive optimisations, as
a convenient preset configuration (thanks to @TrySound).

All cssnano plugins and cssnano itself have migrated to PostCSS 5.x. Please
make sure that when using the 3.x releases that you use a 5.x compatible
PostCSS runner.

cssnano will now compress inline SVG through SVGO. Because of this change,
interfacing with cssnano must now be done through an asynchronous API. The
main process method has the same signature as a PostCSS processor instance.

The old options such as merge & fonts that were deprecated in
release 2.5.0 were removed. The new architecture allows you to specify any
module name to disable it.

postcss-minify-selectors' at-rule compression was extracted out into
postcss-minify-params (thanks to @TrySound).

Overall performance of the module has improved dramatically, thanks to work
by @TrySound and input from the community.

Improved selector merging/deduplication in certain use cases.

cssnano no longer compresses hex colours in filter properties, to better
support old versions of Internet Explorer (thanks to @faddee).

cssnano will not merge properties together that have an inherit keyword.

postcss-minify-font-weight & postcss-font-family were consolidated into
postcss-minify-font-values. Using the old options will print deprecation
warnings (thanks to @TrySound).

The cssnano CLI was extracted into a separate module, so that dependent
modules such as gulp-cssnano don't download unnecessary extras.