Skip to content

Instantly share code, notes, and snippets.

@starryeyez024
Created May 8, 2014 14:34
Show Gist options
  • Save starryeyez024/8d0cb1b6ffd7f941f262 to your computer and use it in GitHub Desktop.
Save starryeyez024/8d0cb1b6ffd7f941f262 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
Node One
<div class"field-item">
<a href="/college/science">Science</a>
</div>
Node two
<div class"field-item">
<a href="/college/humanities">Humanities</a>
</div>
Node three
<div class"field-item">
<a href="/college/education">Education</a>
</div>
// ----
// Sass (v3.3.7)
// Compass (v)
// Breakpoint (v)
// Singularity.gs (v)
// ----
@import "breakpoint"
@import "compass"
@import "singularitygs"
$list: science humanities education
@mixin colleges
@each $college in $list
.#{$college}-icon
background-image: url('/images/#{$college}.png')
.field-item
+colleges
.field-item .science-icon {
background-image: url("/images/science.png");
}
.field-item .humanities-icon {
background-image: url("/images/humanities.png");
}
.field-item .education-icon {
background-image: url("/images/education.png");
}
Node One
<div class"field-item">
<a href="/college/science">Science</a>
</div>
Node two
<div class"field-item">
<a href="/college/humanities">Humanities</a>
</div>
Node three
<div class"field-item">
<a href="/college/education">Education</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment