ccdzxg
Last Updated: February 25, 2016
·
6.607K
· dommmel
E6b625008c816ab3d8d742cc3eddbb00

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>

Say Thanks
Respond

4 Responses
Add your response

7852
A4e26a3b6327a90fe61acf173c3176ff

where do you have your compass config.rb file in the play project?

over 1 year ago ·
7861
E6b625008c816ab3d8d742cc3eddbb00

@brbrown25: I don't have a config.rb file

over 1 year ago ·
9592
2d1826b3f3a24d9030efa02054f365fb

I had to change this line to the following:

net.litola.SassPlugin.sassOptions := Seq("--compass", "-r", "compass", "-r", "zurb-foundation")

over 1 year ago ·
14249
4caad6f69162cc72e9bed5d3142d7970 normal

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 !

over 1 year ago ·