discourse/lib/stylesheet/functions.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
635 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Stylesheet
module ScssFunctions
def asset_url(path)
Discourse.deprecate("The `asset-url` SCSS function is deprecated. Use `absolute-image-url` instead.")
2019-03-21 00:04:26 +08:00
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.asset_url(path.value)}')")
2017-05-02 03:31:51 +08:00
end
def image_url(path)
Discourse.deprecate("The `image-url` SCSS function is deprecated. Use `absolute-image-url` instead.")
2019-03-21 00:04:26 +08:00
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.image_url(path.value)}')")
end
end
end
::SassC::Script::Functions.include(Stylesheet::ScssFunctions)