Last active
August 29, 2015 14:05
-
-
Save alisspers/f7ce8876f79ab864d1fe to your computer and use it in GitHub Desktop.
Exempel på loopar i SASS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _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