Skip to content

Instantly share code, notes, and snippets.

@iamcarrico
Created July 15, 2015 20:00
Show Gist options
  • Save iamcarrico/1bb7071b89c314d9170d to your computer and use it in GitHub Desktop.
Save iamcarrico/1bb7071b89c314d9170d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="button">Apples</div>
<div class="button-green">Bananas</div>
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
$sadness: 10;
@while ($sadness > 0) {
.saddness-#{$sadness} {
color: darken(blue, ($sadness - 1));
}
$sadness: $sadness - 1;
}
// Note: This is not a good usecase.
.saddness-10 {
color: #0000d1;
}
.saddness-9 {
color: #0000d6;
}
.saddness-8 {
color: #0000db;
}
.saddness-7 {
color: #0000e0;
}
.saddness-6 {
color: #0000e6;
}
.saddness-5 {
color: #0000eb;
}
.saddness-4 {
color: #0000f0;
}
.saddness-3 {
color: #0000f5;
}
.saddness-2 {
color: #0000fa;
}
.saddness-1 {
color: blue;
}
<div class="button">Apples</div>
<div class="button-green">Bananas</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment