discourse/lib/stylesheet/functions.rb
Daniel Waterworth e7c0bbb9c0
DEV: Let's always give a drop_from param to deprecate (#14901)
So that we know when deprecations can be removed in the future.
2021-11-12 08:52:59 -06:00

17 lines
675 B
Ruby

# 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.", drop_from: '2.9.0')
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.asset_url(path.value)}')")
end
def image_url(path)
Discourse.deprecate("The `image-url` SCSS function is deprecated. Use `absolute-image-url` instead.", drop_from: '2.9.0')
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.image_url(path.value)}')")
end
end
end
::SassC::Script::Functions.include(Stylesheet::ScssFunctions)