Sha256: d05f8ee93f03800843c4415cd72434b22b75175e7adb541023c4b6f14392d896

Contents?: true

Size: 500 Bytes

Versions: 8

Compression:

Stored size: 500 Bytes

Contents

# This contains functions for use with a project *only* using Compass.

module Sass::Script::Functions
  # Define image_path for Compass to allow use of sprites without url() wrapper.
  def image_path(asset)
    if defined?(::Compass)
      image_url(asset, Sass::Script::Bool.new(true))
    else
      # Revert to the old compass-agnostic path determination
      asset_sans_quotes = asset.value.gsub('"', '')
      Sass::Script::String.new("/images/#{asset_sans_quotes}", :string)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
todc-bootstrap-sass-0.0.6 lib/todc-bootstrap-sass/compass_functions.rb
todc-bootstrap-sass-0.0.5 lib/todc-bootstrap-sass/compass_functions.rb
bootstrap-sass-2.3.1.0 lib/bootstrap-sass/compass_functions.rb
bootstrap-sass-2.3.0.1 lib/bootstrap-sass/compass_functions.rb
bootstrap-sass-2.3.0.0 lib/bootstrap-sass/compass_functions.rb
bootstrap-sass-2.2.2.0 lib/bootstrap-sass/compass_functions.rb
bootstrap-sass-2.2.1.1 lib/bootstrap-sass/compass_functions.rb
bootstrap-sass-2.2.1.0 lib/bootstrap-sass/compass_functions.rb