8.Conditions error


#1

This code doesnt work properly and shows an error message


expected div.ray:nth-child(1) to have its width style equal to 350px but got 349px


$total: 10; //Number of .ray divs in our html
$step: 360deg / $total; //Used to compute the hue based on color-wheel


.ray {
  height: 30px;
}

//Add your for-loop here:
@for $i from 1 through $total {
	.ray:nth-child(#{$i}){
		background: adjust-hue(blue, $i * $step);
    width: if($i % 2 == 0, 300px, 350px);
		margin-left: if($i % 2 == 0, 0px, 50px);
	}
}

Please help me to solve this bug.


#2

Try using Firefox, this should fix it. :slight_smile:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.