discourse/lib/stylesheet/functions.rb

13 lines
380 B
Ruby
Raw Normal View History

module Stylesheet
module ScssFunctions
def asset_url(path)
2017-05-02 03:31:51 +08:00
SassC::Script::String.new("url('#{ActionController::Base.helpers.asset_url(path.value)}')")
end
def image_url(path)
SassC::Script::String.new("url('#{ActionController::Base.helpers.image_url(path.value)}')")
end
end
end
::SassC::Script::Functions.send :include, Stylesheet::ScssFunctions