diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java index e2e30860c..5790aae5d 100644 --- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java +++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java @@ -506,6 +506,14 @@ protected boolean keepRule(ICSSRule newRule) if (!sp.contains("defaults.css")) return true; + // might need to loop over all selectors in selector group + if (newRule.getSelectorGroup().size() > 0) + { + String elementName = newRule.getSelectorGroup().get(0).getElementName(); + if (elementName != null) + if (htmlElementNames.contains(elementName)) + return true; + } return false; }