summaryrefslogtreecommitdiffstats
path: root/theme-compiler/src
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-11-21 17:03:08 +0200
committerMarc Englund <marc@vaadin.com>2012-11-21 17:03:08 +0200
commit044fa4167edf5d0f48357679712eefda5602d6f9 (patch)
tree63dc81b57fe982d8f3c6bf522309342f7cbf8aa4 /theme-compiler/src
parent6ed87c1b6ce280082c2dee21a6f87c1620e0ea79 (diff)
downloadvaadin-framework-044fa4167edf5d0f48357679712eefda5602d6f9.tar.gz
vaadin-framework-044fa4167edf5d0f48357679712eefda5602d6f9.zip
Fixes #10308 (parent reference & causes non-parent selectors to be dropped)
Change-Id: I4821d14b4dc2a9e83e6fbfba67d39e0e3e98970f
Diffstat (limited to 'theme-compiler/src')
-rw-r--r--theme-compiler/src/com/vaadin/sass/visitor/ParentSelectorHandler.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/visitor/ParentSelectorHandler.java b/theme-compiler/src/com/vaadin/sass/visitor/ParentSelectorHandler.java
index cb7b0ac8a8..6b5c5538a4 100644
--- a/theme-compiler/src/com/vaadin/sass/visitor/ParentSelectorHandler.java
+++ b/theme-compiler/src/com/vaadin/sass/visitor/ParentSelectorHandler.java
@@ -32,18 +32,16 @@ public class ParentSelectorHandler {
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();