Переглянути джерело

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

Gildas 7 роки тому
батько
коміт
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);