2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-12 22:52:52 +08:00
|
|
|
module Stylesheet
|
|
|
|
module ScssFunctions
|
|
|
|
def asset_url(path)
|
2021-11-12 22:52:59 +08:00
|
|
|
Discourse.deprecate("The `asset-url` SCSS function is deprecated. Use `absolute-image-url` instead.", drop_from: '2.9.0')
|
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)
|
2021-11-12 22:52:59 +08:00
|
|
|
Discourse.deprecate("The `image-url` SCSS function is deprecated. Use `absolute-image-url` instead.", drop_from: '2.9.0')
|
2019-03-21 00:04:26 +08:00
|
|
|
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.image_url(path.value)}')")
|
2017-04-12 22:52:52 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-05-07 14:50:45 +08:00
|
|
|
::SassC::Script::Functions.include(Stylesheet::ScssFunctions)
|