8.Conditions_error


#1


Hi ,all!

Got interesting error while passing '8.Conditions" lesson. It would be great if someone could help me with it.

https://www.codecademy.com/en/courses/learn-sass/lessons/functions-and-operations/exercises/if-vs-if?action=resume


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


Code:
$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);
    
	}
}


#2

upd:
successfully solved the problem by running the lesson in Mozilla. Error occured in Chrome and IE.


#3

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