Improves selector traversal in advanced merging.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Tue, 10 Feb 2015 07:31:00 +0000 (07:31 +0000)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Tue, 10 Feb 2015 20:43:29 +0000 (20:43 +0000)
commit7ac74d54ebe361e098e9dcbda4cf1a75f7dbc377
tree5626fe3a8303d40bebab9f2b476dff8dbd094467
parent4562c307ce307abf07c8c92d066a55281bb20198
Improves selector traversal in advanced merging.

Selectors can be reordered if one of the following rules regarding
any pair of its properties is met:

* Property name root (`font` in `font-size`) is different, e.g.
  `margin:0` <-> `color:red`
* Property name root, name, and value are the same, e.g.
  `color:red` <-> `color:red`
  `margin-top:0` <-> `margin-top:0`
* Property name root is the same, names are different, and any name
  is not root, e.g
  `margin-top:0` <-> `margin-bottom:10px`
lib/selectors/optimizers/advanced.js
test/fixtures/big-min.css
test/integration-test.js
test/media-queries-test.js