mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:18:24 +08:00
17 lines
635 B
Ruby
17 lines
635 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.")
|
|
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.")
|
|
SassC::Script::Value::String.new("url('#{ActionController::Base.helpers.image_url(path.value)}')")
|
|
end
|
|
end
|
|
end
|
|
|
|
::SassC::Script::Functions.include(Stylesheet::ScssFunctions)
|