-
-
Save Tolia/a6d235c22e57be4b286b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `asset-data-url` sass helper | |
# quick fix for: https://github.com/rails/sass-rails/pull/46 | |
unless Sass::Script::Functions.method_defined?(:asset_data_url) | |
module Sass | |
module Extra | |
module Helpers | |
def asset_data_url(path) | |
data = context_asset_data_uri(path.value) | |
Sass::Script::String.new(%Q{url(#{data})}) | |
end | |
protected | |
def context_asset_data_uri(path) | |
options[:custom][:resolver].context.asset_data_uri(path) | |
end | |
end | |
end | |
end | |
module Sass | |
module Script | |
module Functions | |
include Sass::Extra::Helpers | |
end | |
end | |
end | |
else | |
Rails.logger.warn "THIS FILE IS NO LONGER NECESSARY: #{__FILE__}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment