Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created June 3, 2018 22:32
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 codecademydev/0b34f5417cd1836d1f060c703c75124a to your computer and use it in GitHub Desktop.
Save codecademydev/0b34f5417cd1836d1f060c703c75124a to your computer and use it in GitHub Desktop.
Codecademy export
<link rel="stylesheet" type="text/css" href="main.css">
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
<div class='ray'></div>
$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);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment