ArrayList<String> newList = new ArrayList<String>(block
.getSelectorList().size());
BlockNode parentBlock = (BlockNode) parentNode;
- for (final String s : block.getSelectorList()) {
-
- if (s.contains("&")) {
- for (final String parentSelector : parentBlock
- .getSelectorList()) {
+ for (final String parentSelector : parentBlock.getSelectorList()) {
+ for (final String s : block.getSelectorList()) {
+ if (s.contains("&")) {
newList.add(s.replace("&", parentSelector));
isParentSelector = true;
+ } else {
+ newList.add(parentSelector + " " + s);
}
-
}
}
-
if (isParentSelector) {
block.setSelectorList(newList);
Node oldparent = block.getParentNode();
color: blue;
}
-.part.one, .part.two {
+.part.one, .part.two, .part .non-parent {
+ color: blue;
+}
+
+.root .part.one, .root .part .non-parent, .root .part2.one, .root .part2 .non-parent {
+ color: blue;
+}
+
+.root2 .part .one, .root2 .part .non-parent, .root2 .part2 .one, .root2 .part2 .non-parent {
color: blue;
}
\ No newline at end of file