Adds smart selector restructuring.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Mon, 5 Jan 2015 23:20:27 +0000 (23:20 +0000)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Wed, 25 Feb 2015 22:04:54 +0000 (22:04 +0000)
commit9aa4f49069208950c3090f4c52d2bb2705094a88
tree5b7b2515976a14ca5f683b5fc0c8ee467dddbde0
parent8336f5b3bd7a08ea6e5a7be15e8b75b479e80889
Adds smart selector restructuring.

The algorithm traverses tokens list backwards, picking up any properties
on its way. If a property already exists and has the same value, it adds
the current token to the list of matching that property, otherwise one
of two things happens:

* The property is dropped from the list if there's been only one token
  associated with it.
* It tries to move properties around if it results in a shorter content.
lib/selectors/optimizers/advanced.js
test/fixtures/960-min.css [changed mode: 0755->0644]
test/fixtures/big-min.css
test/fixtures/blueprint-min.css
test/fixtures/issue-437-min.css [new file with mode: 0644]
test/fixtures/issue-437.css [new file with mode: 0644]
test/integration-test.js
test/selectors/optimizer-test.js
test/source-map-test.js