Gildas 7 лет назад
Родитель
Сommit
3801aae270
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      lib/single-file/rules-matcher.js

+ 2 - 2
lib/single-file/rules-matcher.js

@@ -141,7 +141,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 				stylesInfo.forEach(styleInfo => {
 					const important = cssStyle.getPropertyPriority(styleInfo.name) == PRIORITY_IMPORTANT;
 					const styleValue = cssStyle.getPropertyValue(styleInfo.name) + (important ? " !" + PRIORITY_IMPORTANT : "");
-					elementStylesInfo.set(styleInfo.name, { styleValue, cssStyle: ruleInfo.cssStyle });
+					elementStylesInfo.set(styleInfo.name, { styleValue, cssStyle: ruleInfo.cssStyle, important });
 				});
 			} else {
 				const cssStyle = ruleInfo.cssRule.style;
@@ -151,7 +151,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 					const styleValue = cssStyle.getPropertyValue(styleInfo.name) + (important ? " !" + PRIORITY_IMPORTANT : "");
 					let elementStyleInfo = elementStylesInfo.get(styleInfo.name);
 					if (!elementStyleInfo || (important && !elementStyleInfo.important)) {
-						elementStylesInfo.set(styleInfo.name, { styleValue, cssRule: ruleInfo.cssRule, selectorText: ruleInfo.selectorText, selectorsText: ruleInfo.selectorsText });
+						elementStylesInfo.set(styleInfo.name, { styleValue, cssRule: ruleInfo.cssRule, selectorText: ruleInfo.selectorText, selectorsText: ruleInfo.selectorsText, important });
 					}
 				});
 			}