Skip to content

Instantly share code, notes, and snippets.

@marclipovsky
Created October 22, 2012 03:52
Show Gist options
  • Save marclipovsky/3929547 to your computer and use it in GitHub Desktop.
Save marclipovsky/3929547 to your computer and use it in GitHub Desktop.
SCSS HAML Filter
# encoding: UTF-8
module Haml::Filters
module Scss
include Base
lazy_require 'sass/plugin'
def render (text)
"<style>\n/*<![CDATA[*/\n" + ::Sass::Engine.new(text, ::Sass::Plugin.engine_options.merge(syntax: :scss)).render + "\n/*]]>*/\n</style>"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment