Skip to content

Commit

Permalink
define the asset_url function in the right context.
Browse files Browse the repository at this point in the history
  • Loading branch information
botandrose-machine committed May 15, 2020
1 parent 8d0462d commit be96c49
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/sassc/rails/functions.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# frozen_string_literal: true

require 'sprockets/sass_functions'
require 'sprockets/sassc_processor'

module Sprockets
module SassFunctions
def asset_data_url(path)
::SassC::Script::Value::String.new("url(" + sprockets_context.asset_data_uri(path.value) + ")")
end
module Sprockets::SasscProcessor::Functions
def asset_data_url(path)
::SassC::Script::Value::String.new("url(" + sprockets_context.asset_data_uri(path.value) + ")")
end
end

::SassC::Script::Functions.send :include, Sprockets::SassFunctions
::SassC::Script::Functions.send :include, Sprockets::SasscProcessor::Functions

0 comments on commit be96c49

Please sign in to comment.