Skip to content

Instantly share code, notes, and snippets.

@alisspers
Last active August 29, 2015 14:05
Show Gist options
  • Save alisspers/f7ce8876f79ab864d1fe to your computer and use it in GitHub Desktop.
Save alisspers/f7ce8876f79ab864d1fe to your computer and use it in GitHub Desktop.
Exempel på loopar i SASS
<ul class="network-list">
<li class="network-node austria">
<a href="#">Austria</a>
</li>
<li class="network-node belgium">
<a href="#">Belgium</a>
</li>
<!-- […] -->
</ul>
// _settings.scss
$countries: (
austria,
belgium,
denmark,
europe,
finland,
france,
germany,
great-britain,
italy,
netherlands,
norway,
spain,
sweden,
switzerland,
);
// _footer.scss
.network-node {
a:before {
// [common css for all flags]
}
@each $country in $countries {
&.#{$country} a:before { @include sprite($flags, #{$country}); }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment