Compass Css Framework Plugin
Dependency :
compile ":grass:0.2"
Summary
Installation
To install plugin download it from download page here. Latest version for now is 0.2. Then run:
grails install-plugin grails-grass-0.2.zip
Description
This plugin is badly out of date. Please use (or migrate to) the compass-sass plugin.Compass is a stylesheet authoring tool that uses a the Sass stylesheet language to make your stylesheets smaller and your web site easier to maintain. This plugin brings compass advantages to Grails.
Changes since previous version
- Plugin has been renamed to
Grass- thanks to Robert Fischer for his idea in the mailing list and permission to use it. - Issue with relative paths to images in compiled css has been resolved.
- @grails grid-img@ has been implemented.
- Command
grails compass-initshows proper html code to be included into your layout.
Install Dependencies
Compass-css requires Compass to be installed. For detailed instructions please on installing compass see here . Obviously it is necessary to have ruby installed. Looking forward to compass being ported to java.Install
To install plugin download it from download page here. Latest version for now is 0.2. Then run:grails install-plugin grails-grass-0.2.zip
Usage
After installing you get the following new grails commands:grails compass-init grails compile-css grails grid-img grails list-compass-frameworks
- To get list of currently supported compass frameworks use:
grails list-compass-frameworks. Currently supported compass frameworks are blueprint and yui. - To start working with preferred framework (e.g. blueprint) run command:
grails compass-init blueprint. This command copies blueprint sass stylesheets to./src/stylesheetsfolder andGrassConfig.groovyto./grails-app/config. - To compile sass stylesheets in
./src/stylesheetsrun command:grails compile-css. Parameters for running commang are taken fromGrassConfig.groovy. - Command to generate
grid.png-grails grid-img.
grails run-app compass plugin watches for changes in ./src/stylesheets and compiles sass stylesheets when they are changed. So you can observe up to date css styles in your application.Configuration
Configuration for compass plugin is kept inGrassConfig.groovy and includes parameters for running compass compiler.The default configuration is given below:grass {
sass_dir = "./src/stylesheets" css_dir = "./web-app/css" images_dir = "web-app/images" // default is true
relative_assets = true // other options: nested, expanded, compact, compressed
output_style = "compact"
}Uninstall
To uninstall compass plugin rungrails uninstall grass . It would be also necessary to:
- manually remove
./src/stylesheetsfolder containing sass stylesheets - compiled css in
./web-app/css. - manually remove @./grails-app/conf/GrassConfig.groovy@
Known Issues
- After compiling sass stylesheets folder
./src/stylesheets/.sass-cacheis created. - Changing
GrassConfig.groovydoes not cause recompiling sass stylesheets when runninggrails run-app. Is planned to be resolved in near future.