1
0
Эх сурвалжийг харах

fixed selector selection issue when an element matches multple selctors in a list

Gildas 7 жил өмнө
parent
commit
3fcd9df017

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

@@ -105,7 +105,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 				specificity.sheetIndex = sheetIndex;
 				let ruleInfo = elementInfo.find(ruleInfo => ruleInfo.cssRule == cssRule);
 				if (ruleInfo) {
-					if (compareSpecificity(ruleInfo.specificity, specificity)) {
+					if (compareSpecificity(ruleInfo.specificity, specificity) == 1) {
 						ruleInfo.specificity = specificity;
 						ruleInfo.selectorText = selectorText;
 					}