2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-12 10:52:52 -04:00
|
|
|
module Stylesheet
|
|
|
|
module ScssFunctions
|
|
|
|
def asset_url(path)
|
2021-04-11 23:57:39 -04:00
|
|
|
Discourse.deprecate("The `asset-url` SCSS function is deprecated. Use `absolute-image-url` instead.")
|
2019-03-20 12:04:26 -04:00
|
|
|
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.asset_url(path.value)}')")
|
2017-05-01 15:31:51 -04:00
|
|
|
end
|
|
|
|
def image_url(path)
|
2021-04-11 23:57:39 -04:00
|
|
|
Discourse.deprecate("The `image-url` SCSS function is deprecated. Use `absolute-image-url` instead.")
|
2019-03-20 12:04:26 -04:00
|
|
|
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.image_url(path.value)}')")
|
2017-04-12 10:52:52 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-05-07 02:50:45 -04:00
|
|
|
::SassC::Script::Functions.include(Stylesheet::ScssFunctions)
|