Patched Haskell library for use in Snowdrift

fr33domlover e25b7f6699 Merge branch 'whitespace' of h30/shakespeare-sass into master 3 years ago
src 7804300138 Add hack to improve CSS formatting when in dev mode 3 years ago
test 41ccf853d0 Add tests for the whitespace formatting of CSS output 3 years ago
.gitignore 55150eb1b9 Upgraded build system to hpack 4 years ago
.travis.yml dc1fd0cab9 Deploy only on tags 4 years ago
LICENSE 29022a8ac2 Relaxed dependencies a bit and switched license to BSD3 5 years ago 2d1c97edcc Added build statuses 5 years ago
Setup.hs d505207638 Initial import from cabal init 5 years ago
package.yaml 41ccf853d0 Add tests for the whitespace formatting of CSS output 3 years ago
stack-lts-2.yaml f6f5b00121 Relaxed deps a bit more and fixed travis for lts-2 5 years ago
stack.yaml a7843c95a3 Use Hackage hsass-0.5.0 4 years ago

Shakespeare SASS

Build Status Hackage Hackage deps


Shakepeare SASS is a package to enable the usage of SASS language in the Yesod web framework.

Using Shakespeare SASS

Adding SASS support to your Yesod website is, actually, quite simple and straight-forward. After adding shakespeare-sass into your .cabal file (and stack.yaml if you are using stack), all you have to do is change your widgetFileSettings in Settings.hs from = def to = wfsSass ["sass_include/"]. And, of course, import Text.Shakespeare.Sass at the beginning of the file.

The argument for wfsSass function is a list of directories relative to the project root where you want your .sass or .scss include files stored. The main SASS files will still reside in your templates directory, as it is with the default setup with .lucius files. That way you get to keep your mixins separate from the templates and have a clear directory structure. Of course, you can always add your templates directory to sass search path and keep everything in templates dir.

Note about deployment with Keter

In case you are using Keter for deployment (and you should, it's a great tool), you should also add directories with your sass templates to the extraFiles: list in the config/keter.yaml file. Don't forget to put the ../ prefix, since keter.yaml's paths are relative to the config directory.