If a matching component and the corresponding token are both important, treat it as if neither is
+[2.2.13 / 2014-xx-xx](https://github.com/GoalSmashers/clean-css/compare/v2.2.12...v2.2.13)
+==================
+
+* Fixed issue [#337](https://github.com/GoalSmashers/clean-css/issues/337) - handling component importance.
+
[2.2.12 / 2014-08-02](https://github.com/GoalSmashers/clean-css/compare/v2.2.11...v2.2.12)
==================
if (can(matchingComponent.value, token.value)) {
// The component can override the matching component in the shorthand
- if (!token.isImportant) {
+ if (!token.isImportant || token.isImportant && matchingComponent.isImportant) {
// The overriding component is non-important which means we can simply include it into the shorthand
// NOTE: stuff that can't really be included, like inherit, is taken care of at the final step, not here
matchingComponent.value = token.value;
--- /dev/null
+div{background:#fff!important}
--- /dev/null
+div {
+ background: #eeeeee !important;
+ background-color: #ffffff !important;
+}