Просмотр исходного кода

determine used style attributes when computing the cascade only when the media is "all"

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

+ 1 - 1
lib/single-file/css-rules-matcher.js

@@ -191,7 +191,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 				if (!styleValue) {
 					ruleInfo.style.set(styleName, elementStyleInfo.styleValue);
 				}
-			} else {
+			} else if (mediaInfo == mediaAllInfo) {
 				const styleInfo = elementStyleInfo.selectorInfo.styleInfo;
 				const cssStyle = styleInfo.cssStyle;
 				const matchedStyleInfo = mediaAllInfo.matchedStyles.get(cssStyle);