File: functions.rb

package info (click to toggle)
ruby-sassc-rails 2.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 428 kB
  • sloc: ruby: 628; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

require 'sprockets/sass_functions'

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

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