![JAR search and dependency download from the Maven repository](/logo.png)
org.serversass.ast.Stylesheet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-sass Show documentation
Show all versions of server-sass Show documentation
server-sass is a simple implementation of SASS (sass-lang.org)
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package org.serversass.ast;
import java.util.ArrayList;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: aha
* Date: 13.02.14
* Time: 22:22
* To change this template use File | Settings | File Templates.
*/
public class Stylesheet {
private String name;
private List variables = new ArrayList();
private List mixins = new ArrayList();
private List sections = new ArrayList();
private List imports = new ArrayList();
public Stylesheet(String name) {
this.name = name;
}
public void addImport(String name) {
imports.add(name);
}
public void addVariable(Variable variable) {
variables.add(variable);
}
public void addSection(Section section) {
sections.add(section);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
for (Variable var : variables) {
sb.append(var);
sb.append(";\n");
}
for (Section s : sections) {
sb.append("\n");
sb.append(s);
}
return sb.toString();
}
public void addMixin(Mixin mixin) {
mixins.add(mixin);
}
public List getVariables() {
return variables;
}
public List getMixins() {
return mixins;
}
public List getSections() {
return sections;
}
public List getImports() {
return imports;
}
public String getName() {
return name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy