aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-10-04 07:28:18 +0000
committerVaadin Code Review <review@vaadin.com>2012-10-04 07:28:18 +0000
commitdaa5d9cbdf53e53b7a6d5d5def2fd3bd76c87b07 (patch)
treed29642d537768067629b1a44fac85301776b642e
parent7fbe0ffd7c967728a1e437d0cbe03722ed9f1b6e (diff)
parentf310829d004443b40d32698bd46c9c7db8ba187a (diff)
downloadvaadin-framework-daa5d9cbdf53e53b7a6d5d5def2fd3bd76c87b07.tar.gz
vaadin-framework-daa5d9cbdf53e53b7a6d5d5def2fd3bd76c87b07.zip
Merge "FontFace nodes are created correctly, fixes #9611"
-rw-r--r--theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java7
-rw-r--r--theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java18
2 files changed, 23 insertions, 2 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java
index c10d29aad9..65ae3d5e93 100644
--- a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java
+++ b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java
@@ -31,6 +31,7 @@ import com.vaadin.sass.parser.LexicalUnitImpl;
import com.vaadin.sass.tree.BlockNode;
import com.vaadin.sass.tree.CommentNode;
import com.vaadin.sass.tree.ExtendNode;
+import com.vaadin.sass.tree.FontFaceNode;
import com.vaadin.sass.tree.ForNode;
import com.vaadin.sass.tree.ImportNode;
import com.vaadin.sass.tree.ListRemoveNode;
@@ -171,12 +172,14 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler {
@Override
public void startFontFace() throws CSSException {
- System.out.println("startFontFace()");
+ FontFaceNode node = new FontFaceNode();
+ nodeStack.peek().appendChild(node);
+ nodeStack.push(node);
}
@Override
public void endFontFace() throws CSSException {
- System.out.println("endFontFace()");
+ nodeStack.pop();
}
@Override
diff --git a/theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java b/theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java
new file mode 100644
index 0000000000..3dab4df773
--- /dev/null
+++ b/theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java
@@ -0,0 +1,18 @@
+package com.vaadin.sass.tree;
+
+public class FontFaceNode extends Node {
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("@font-face {\n");
+
+ for (final Node child : children) {
+ builder.append("\t" + child.toString() + "\n");
+ }
+
+ builder.append("}");
+ return builder.toString();
+ }
+
+}