Sha256: 6f179f73f06d7be88f57b2f6caf764a7caa777fa6efdcad891e2a74a63b6f830

Contents?: true

Size: 482 Bytes

Versions: 8

Compression:

Stored size: 482 Bytes

Contents

require 'sass'

module Sass::Script::Functions
  # Snatched from compass - 2011-11-29 - used for gradients in IE6-9
  # returns an IE hex string for a color with an alpha channel
  # suitable for passing to IE filters.
  def ie_hex_str(color)
    assert_type color, :Color
    alpha = (color.alpha * 255).round
    alphastr = alpha.to_s(16).rjust(2, '0')
    Sass::Script::String.new("##{alphastr}#{color.send(:hex_str)[1..-1]}".upcase)
  end
  
  declare :ie_hex_str, [:color]
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sass-rails-bootstrap-2.2.2.3 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.2.2.2 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.2.2.1 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.2.2 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.2.1 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.1.1 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.1.0.1 lib/sass-rails-bootstrap/sass_functions.rb
sass-rails-bootstrap-2.1.0 lib/sass-rails-bootstrap/sass_functions.rb