forked from twbs/bootstrap-sass
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Microsoft.gradient issue with SASS asset compilation. Resolves tw…
- Loading branch information
Robert Jackson
committed
Dec 23, 2011
1 parent
47187a2
commit 2ae6483
Showing
4 changed files
with
33 additions
and
3 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
require 'sass' | |||
|
|||
module Sass::Script::Functions | |||
# LARS: 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 |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
require 'sass' | |||
|
|||
module Sass::Script::Functions | |||
# LARS: 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 |
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