public class Section extends Object
| Constructor and Description |
|---|
Section() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(Attribute attr)
Adds an attribute to this section.
|
void |
addExtends(String name)
Adds an extend instruction.
|
void |
addMediaQuery(Expression query)
Adds a media query to this section.
|
void |
addMixinReference(MixinReference ref)
Adds a mixin instruction.
|
void |
addSubSection(Section section)
Adds a sub section.
|
void |
generate(Output out)
Generates the final output into the given parameter.
|
List<Attribute> |
getAttributes()
Returns a list of all attributes.
|
List<String> |
getExtendedSections()
Returns a list of all extended sections.
|
String |
getMediaQuery(Scope scope,
Generator gen)
Compiles the effective media query of this section into a string
|
List<MixinReference> |
getReferences()
Returns a list of all referenced mixins.
|
List<List<String>> |
getSelectors()
Returns a list of all parsed selector chains.
|
String |
getSelectorString()
Compiles the effective selector string.
|
List<Section> |
getSubSections()
Returns a list of all sub sections.
|
String |
toString() |
public List<List<String>> getSelectors()
public void addAttribute(Attribute attr)
attr - the attribute to addpublic void addMediaQuery(Expression query)
query - the media query to add.public void addSubSection(Section section)
section - the section to addpublic void addExtends(String name)
name - the name of the element to extendpublic void addMixinReference(MixinReference ref)
ref - the mixin to referencepublic List<String> getExtendedSections()
public List<Attribute> getAttributes()
public List<Section> getSubSections()
public List<MixinReference> getReferences()
public String getMediaQuery(Scope scope, Generator gen)
scope - the scope used to resolve variablesgen - the generator used to evaluate functionspublic String getSelectorString()
public void generate(Output out) throws IOException
out - the target for the generated outputIOException - in case of an io error in the underlying writerCopyright © 2016. All rights reserved.