Fix some x-browser issues in the gradient point code.
This commit is contained in:
parent
cee0eef688
commit
a8457c99db
@ -92,17 +92,22 @@ module Compass::SassExtensions::Functions::GradientSupport
|
|||||||
def grad_point(position)
|
def grad_point(position)
|
||||||
position = position.value
|
position = position.value
|
||||||
position = if position[" "]
|
position = if position[" "]
|
||||||
position
|
if position =~ /(top|bottom) (left|right)/
|
||||||
|
"#{$2} #{$1}"
|
||||||
|
else
|
||||||
|
position
|
||||||
|
end
|
||||||
else
|
else
|
||||||
case position
|
case position
|
||||||
when /top|bottom/
|
when /top|bottom/
|
||||||
"#{position} left"
|
"left #{position}"
|
||||||
when /left|right/
|
when /left|right/
|
||||||
"top #{position}"
|
"#{position} top"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Sass::Script::String.new position.gsub(/top/, "0%").gsub(/bottom/, "100%").gsub(/left/,"0%").gsub(/right/,"100%")
|
Sass::Script::String.new position.gsub(/top/, "0%").gsub(/bottom/, "100%").gsub(/left/,"0%").gsub(/right/,"100%")
|
||||||
end
|
end
|
||||||
|
|
||||||
def color_stops(*args)
|
def color_stops(*args)
|
||||||
List.new(*args.map do |arg|
|
List.new(*args.map do |arg|
|
||||||
case arg
|
case arg
|
||||||
|
Loading…
Reference in New Issue
Block a user