aboutsummaryrefslogtreecommitdiffstats
path: root/theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java')
-rw-r--r--theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java b/theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java
new file mode 100644
index 0000000000..cbd3b14289
--- /dev/null
+++ b/theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java
@@ -0,0 +1,29 @@
+package com.vaadin.sass.tree;
+
+import java.util.ArrayList;
+
+public class MicrosoftRuleNode extends Node implements IVariableNode {
+
+ private final String name;
+ private String value;
+
+ public MicrosoftRuleNode(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ @Override
+ public void replaceVariables(ArrayList<VariableNode> variables) {
+ for (final VariableNode var : variables) {
+ if (value.contains("$" + var.getName())) {
+ value = value.replaceAll("$" + var.getName(), var.getExpr()
+ .toString());
+ }
+ }
+ }
+
+ @Override
+ public String toString() {
+ return name + ": " + value + ";";
+ }
+}