Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezos86/64bb044c913403ae4726 to your computer and use it in GitHub Desktop.
Save ezos86/64bb044c913403ae4726 to your computer and use it in GitHub Desktop.
A Pen by ezos86.
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>

Quick Color Gradients with Sass (Scss)

Make a quick color gradient with scss.

A Pen by ezos86 on CodePen.

License.

@import "compass/css3";
$color1:#000;
@for $i from 1 through 20 {
div:nth-child(#{$i}) {
background:lighten($color1,5%*$i);
width:10%;
float:left;
height:100px;
@if ($i<11){
color:#f1f1f1;
}
}
$color2: lighten($color1,5%*$i);
div:nth-child(#{$i}):after {
content:'#{$color2}';
position:absolute;
padding-left:8px;
padding-top:30px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment