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;
@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
--- /dev/null
+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();
+ }
+
+}