aboutsummaryrefslogtreecommitdiffstats
path: root/theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-09-21 11:52:52 +0300
committerMarc Englund <marc@vaadin.com>2012-09-21 11:53:22 +0300
commit8b28ea439cf09b69574009337c2659dd653d3760 (patch)
treec7e28e1e29b5608115b84f7b0b0cc334fd312455 /theme-compiler/src/com/vaadin/sass/tree/MicrosoftRuleNode.java
parent9500a714336d6f08b47f7cba980fc82faf318ef3 (diff)
downloadvaadin-framework-8b28ea439cf09b69574009337c2659dd653d3760.tar.gz
vaadin-framework-8b28ea439cf09b69574009337c2659dd653d3760.zip
Big SassCompiler change, fixes #9411 #9489 partials for #9354 #9545 #9380 (applied patch)
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 + ";";
+ }
+}