Play Framework 2 with Zurb Foundation and Compass/Sass
Here is how you can use Zurb Foundation together with the Scala web framework Play 2.0.
Add Sass asset handling
add the following plugin to enable Sass asset handling for Play Framework 2.0: https://github.com/jlitola/play-sass
Configure the plugin to use compass and zurb
to tell the plugin to use compass and zurb foundation add the following to build.sbt</code> in your play app's root folder
net.litola.SassPlugin.sassOptions := Seq("--compass","-r", "zurb-foundation")</code>
Written by dommmel
Related protips
4 Responses
where do you have your compass config.rb file in the play project?
@brbrown25: I don't have a config.rb file
I had to change this line to the following:
net.litola.SassPlugin.sassOptions := Seq("--compass", "-r", "compass", "-r", "zurb-foundation")
I have done as told. But I am having one issue. When I create a sass file it works fine for general sass and compiles properly. But when I want to use Foundation variables in my sass file then it does not have any effect on the css. The IDE does show me suggestions for variables which it says are implicitly imported but use of those variables had no effect on the views.
I tried importing Foundation.scss by @import command as we do in compass. but it gave an error as there was no such file.
I was using Foundation WebJar in my project.
Can you please help !