Configuration for GrooCSS conversions. There are at least four different ways to configure GrooCSS:
Type | Name and description |
---|---|
boolean |
addMoz |
boolean |
addMs |
boolean |
addOpera |
boolean |
addWebkit |
String |
charset |
boolean |
compress |
boolean |
convertUnderline Whether or not convert under-scores in CSS classes into dashes (main_content becomes main-content). |
boolean |
prettyPrint |
Collection<Processor> |
processors Custom processors/validators to use. |
Set<String> |
styleClasses Element-names that you only want to use as CSS classes. |
Map<String, Object> |
variables Variables to make available in the processed GrooCSS files. |
Type Params | Return Type | Name and description |
---|---|---|
|
Config |
compress() Sets the compress flag to true. |
|
Config |
convertUnderline() Set the convertUnderline flag to true. |
|
protected void |
loadFrom(Properties props) |
|
Config |
noExts() Sets all extension adding flags to false. |
|
Config |
onlyMoz() Sets all extension adding flags to false except moz. |
|
Config |
onlyMs() Sets all extension adding flags to false except ms. |
|
Config |
onlyOpera() Sets all extension adding flags to false except opera. |
|
Config |
onlyWebkit() Sets all extension adding flags to false except webkit. |
|
Config |
prettyPrint() Sets the prettyPrint flag to true. |
|
void |
setProcessors(Collection<Processor> list) If given collection is not empty, adds to processors. |
|
void |
setStyleClasses(Set<String> set) If given Set is not empty, adds to styleClasses. |
|
void |
setVariables(Map<String, Object> variables) If given map is not empty, adds to variables. |
|
Config |
useAsClass(String name) Add one Element-name, like 'link', that you only want to use as CSS class. |
|
Config |
useAsClasses(Collection<String> classes) Add Element-names, like 'link', that you only want to use as CSS classes. |
|
Config |
utf8() Sets the charset to UTF-8. |
|
Config |
withProcessorClasses(Collection<Class<? extends Processor>> classes) Takes a Collection of Classes which must extend Processor and have a public no-args constructor. |
|
Config |
withProcessors(Collection<Processor> list) Takes a Collection of objects which must extend Processor, and adds them to the list of processors. |
|
Config |
withStyleClasses(Collection<String> list) Element-names that you only want to use as CSS classes. |
|
Config |
withVariable(String key, Object value) Takes a variable name and value, adds it to variables Map. |
|
Config |
withVariables(String key, Object value, String key2, Object value2) Takes a two variable names and values, adds them to variables Map. |
|
Config |
withVariables(Map<String, Object> variables) Takes a map of variable name to value, adds them to variables Map. |
Whether or not convert under-scores in CSS classes into dashes (main_content becomes main-content). Default is false.
Custom processors/validators to use.
Loads the Config from the given Properties. Lists use comma separated values and boolean values consider "true" true and everything else is false. Variables can be defined with the "variable." prefix. The "processors" property should be a comma-separated list of full class names. For example: processors=org.groocss.valid.RequireMeasurements.
Loads the Config from the given Properties File.
Loads the Config from the given Properties File with given path.
Sets the compress flag to true.
Set the convertUnderline flag to true.
Sets all extension adding flags to false.
Sets all extension adding flags to false except moz.
Sets all extension adding flags to false except ms.
Sets all extension adding flags to false except opera.
Sets all extension adding flags to false except webkit.
Sets the prettyPrint flag to true.
If given collection is not empty, adds to processors.
Add one Element-name, like 'link', that you only want to use as CSS class.
Add Element-names, like 'link', that you only want to use as CSS classes.
Sets the charset to UTF-8.
Takes a Collection of Classes which must extend Processor and have a public no-args constructor.
Takes a Collection of objects which must extend Processor, and adds them to the list of processors.
Element-names that you only want to use as CSS classes.
Takes a variable name and value, adds it to variables Map.
Takes a two variable names and values, adds them to variables Map.
Groovy Documentation