Adds semantic merging (off by default).
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Mon, 4 May 2015 14:54:45 +0000 (15:54 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Sun, 31 May 2015 13:47:47 +0000 (14:47 +0100)
commitbd03cb3114c5ea20cbb928aa5ffb89b7ab361dd1
tree21f5496a75470e14c88a918c95de9b847d4ffd8a
parenta90b572920bfbc1f8ade5e2a995191b1ac67e2c8
Adds semantic merging (off by default).

The main obstacle on reordering and merging declarations is a fact that
arbitrary classes can be applied to an element and at CSS level we don't
know if that's the case or not.

However with semantic merging mode on we trust CSS author knows what she is doing.

This commit is just a start (see #588) of a journey. It is and will always
be turned off by default as it requires certain effort from stylesheets'
author.

So far plain class selectors and some BEM basics are supported.
README.md
bin/cleancss
lib/clean.js
lib/selectors/optimizers/advanced.js
test/binary-test.js
test/module-test.js
test/selectors/optimizer-test.js