-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
define the asset_url function in the right context.
- Loading branch information
1 parent
8d0462d
commit be96c49
Showing
1 changed file
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
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 |