Process all element classes

This commit is contained in:
M66B 2023-08-26 17:41:51 +02:00
parent 7a8efad076
commit 61a5db408d
1 changed files with 12 additions and 5 deletions

View File

@ -1798,11 +1798,18 @@ public class HtmlHelper {
style = mergeStyles(style, srule.getStyle().getCssText(), false); style = mergeStyles(style, srule.getStyle().getCssText(), false);
break; break;
case Selector.SAC_CONDITIONAL_SELECTOR: case Selector.SAC_CONDITIONAL_SELECTOR:
ConditionalSelectorImpl cselector = (ConditionalSelectorImpl) selector; if (!TextUtils.isEmpty(clazz)) {
if (cselector.getCondition().getConditionType() == SAC_CLASS_CONDITION) { ConditionalSelectorImpl cselector = (ConditionalSelectorImpl) selector;
ClassConditionImpl ccondition = (ClassConditionImpl) cselector.getCondition(); if (cselector.getCondition().getConditionType() == SAC_CLASS_CONDITION) {
if (clazz.equalsIgnoreCase(ccondition.getValue())) ClassConditionImpl ccondition = (ClassConditionImpl) cselector.getCondition();
style = mergeStyles(style, srule.getStyle().getCssText(), false); String value = ccondition.getValue();
for (String cls : clazz.split("\\s+"))
if (cls.equalsIgnoreCase(value)) {
style = mergeStyles(style, srule.getStyle().getCssText(), false);
break;
}
}
} }
break; break;
} }