Sha256: 1af150fcc16da4aaea710ba261ee10d0d76c6f449cfc7394c49a21cb3676e4ec
Contents?: true
Size: 816 Bytes
Versions: 20
Compression:
Stored size: 816 Bytes
Contents
module Sass module Script module Functions def image_path(source, _options = {}) if defined?(::Sprockets) ::Sass::Script::String.new sprockets_context.image_path(source.value).to_s, :string elsif defined?(::Compass) image_url(source, Sass::Script::Bool.new(true)) else # Revert to the old compass-agnostic path determination asset_sans_quotes = source.value.delete('"') Sass::Script::String.new("/images/#{asset_sans_quotes}", :string) end end protected def sprockets_context # :nodoc: if options.key?(:sprockets) options[:sprockets][:context] else # Compatibility with sprockets pre 2.10.0 options[:importer].context end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems