Skip to content

Instantly share code, notes, and snippets.

@perplexes
Last active December 11, 2015 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perplexes/d4a4dae3214fff2143e6 to your computer and use it in GitHub Desktop.
Save perplexes/d4a4dae3214fff2143e6 to your computer and use it in GitHub Desktop.
Parsing bug linear-gradient
.test{ background-image: -ms-linear-gradient(top left, #4D303B48 0%, #4D2C3642 100%);}
bad = []
good = []
index = 0
(0..4294967295).each do |i|
hex = rand(4294967295).to_s(16).upcase.rjust(8, "0")
scss= ".test{ background-image: -ms-linear-gradient(##{hex} 0%, ##{hex} 100%);}"
`echo "#{scss}" | sassc 2>/dev/null`
if $?.success?
good << hex
else
bad << hex
end
index += 1
if index % 100 == 0
puts "good: #{good.count}, bad: #{bad.count}"
end
end
$ ~/src/reference/sassc/bin/sassc gradient.scss
Error: error reading values after
on line 1 of gradient.scss
>> round-image: -ms-linear-gradient(top left, #4D303B48 0%, #4D2C3642 100%);}
------------------------------------------^
$ ~/src/reference/sassc/bin/sassc -v
sassc: 3.3.0
libsass: 3.3.2-32-gb2a3
sass2scss: 1.0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment