Don't output transparent in css2 ouput.

Closes GH-309
This commit is contained in:
Chris Eppstein 2011-03-27 21:03:14 -07:00
parent a7b8689fb8
commit 119ce9d018
2 changed files with 19 additions and 0 deletions

View File

@ -92,4 +92,22 @@ module Sass::Script
end
end
class String < Literal
def supports?(aspect)
aspect == "css2" && value == "transparent" && type == :identifier
end
def has_aspect?
true
end
def to_css2(options = self.options)
if value == "transparent" && type == :identifier
Sass::Script::String.new("")
else
dup
end
end
end
end

View File

@ -87,6 +87,7 @@ class SassExtensionsTest < Test::Unit::TestCase
assert_equal "true", evaluate("blank('')")
assert_equal "true", evaluate("blank(' ')")
assert_equal "true", evaluate("blank(-compass-space-list(' '))")
assert_equal " ", evaluate("-css2(transparent linear-gradient(#fff,#000))")
end
protected