File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -297,9 +297,9 @@ fn parse_color_function(name: &str, arguments: &[ComponentValue])
297297 let hue = expect_number ! ( ) / 360. ;
298298 let hue = hue - hue. floor ( ) ;
299299 expect_comma ! ( ) ;
300- let saturation = ( expect_percentage ! ( ) / 100. ) . min ( 0. ) . max ( 1. ) ;
300+ let saturation = ( expect_percentage ! ( ) / 100. ) . max ( 0. ) . min ( 1. ) ;
301301 expect_comma ! ( ) ;
302- let lightness = ( expect_percentage ! ( ) / 100. ) . min ( 0. ) . max ( 1. ) ;
302+ let lightness = ( expect_percentage ! ( ) / 100. ) . max ( 0. ) . min ( 1. ) ;
303303
304304 // http://www.w3.org/TR/css3-color/#hsl-color
305305 fn hue_to_rgb ( m1 : f64 , m2 : f64 , mut h : f64 ) -> f64 {
@@ -321,7 +321,7 @@ fn parse_color_function(name: &str, arguments: &[ComponentValue])
321321
322322 let alpha = if has_alpha {
323323 expect_comma ! ( ) ;
324- ( expect_number ! ( ) ) . min ( 0. ) . max ( 1. ) as f32
324+ ( expect_number ! ( ) ) . max ( 0. ) . min ( 1. ) as f32
325325 } else {
326326 1.
327327 } ;
You can’t perform that action at this time.
0 commit comments