gradient rounding issue tentative fix
This commit is contained in:
parent
86788e5ee2
commit
d845c4d486
@ -7,7 +7,7 @@ GIT
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
compass (0.11.beta.6.bc4e3ee)
|
||||
compass (0.11.beta.7.86788e5)
|
||||
chunky_png (~> 1.1.0)
|
||||
sass (>= 3.1.0.alpha.249)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
require 'bigdecimal'
|
||||
module Compass::SassExtensions::Functions::GradientSupport
|
||||
|
||||
GRADIENT_ASPECTS = %w(webkit moz svg pie css2 o owg).freeze
|
||||
@ -289,7 +290,7 @@ module Compass::SassExtensions::Functions::GradientSupport
|
||||
stop = pos.stop
|
||||
stop = stop.div(max).times(Sass::Script::Number.new(100,["%"])) if stop.numerator_units == max.numerator_units && max.numerator_units != ["%"]
|
||||
# Make sure the color stops are specified in the right order.
|
||||
if last_value && stop.numerator_units == last_value.numerator_units && stop.denominator_units == last_value.denominator_units && stop.value < last_value.value
|
||||
if last_value && stop.numerator_units == last_value.numerator_units && stop.denominator_units == last_value.denominator_units && BigDecimal.new(stop.value.to_s) < BigDecimal.new(last_value.value.to_s)
|
||||
raise Sass::SyntaxError.new("Color stops must be specified in increasing order. #{stop.value} came after #{last_value.value}.")
|
||||
end
|
||||
last_value = stop
|
||||
|
@ -28,3 +28,7 @@ $grid-background-gutter-width: 1%;
|
||||
.percent-combined {
|
||||
@include grid-background;
|
||||
}
|
||||
|
||||
.forced-fluid {
|
||||
@include column-grid-background(12, 2em, 1em, 1em, $grid-background-column-color, $grid-background-gutter-color, true);
|
||||
}
|
Loading…
Reference in New Issue
Block a user