visitController.replaceCurrentBlockChildWith(currentConditional.getBlock().getChildren(),
true);
return true;
} else {
// node evaluated to true before the runtime condition, transform this node to an else node
CssConditionalRuleNode newNode = new CssConditionalRuleNode(Type.ELSE,
currentConditional.getName(), null, currentConditional.getBlock());
newChildren.add(newNode);
break;
}
}
CssConditionalBlockNode newNode = new CssConditionalBlockNode();
for (CssConditionalRuleNode child : newChildren) {
newNode.addChildToBack(child);
}
visitController.replaceCurrentBlockChildWith(Lists.newArrayList(newNode), true);
// mark this node as already visited.