Created
January 23, 2014 19:12
-
-
Save tobystokes/8584886 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
//interpolation bug in libsass example | |
$authors: Markus Huber, Jasmin Pakbeen, Richard Wiltshire, Ishaq Siddiqi, Mark Priest, Joe Rundle, Lucas Rouxdeluze, Adrien Cohen, Monira Lor, Max Stigliano; | |
// this on it's own works: | |
@each $name in $authors { | |
$one: #{nth($name, 1)}; | |
.firstname.#{nth($name, 1)}-#{nth($name, 2)} { | |
background-image: url(#{nth($name, 1)}.png); | |
} | |
} | |
// but this doesn't: | |
//@each $name in $authors { | |
// .name.#{nth($name, 1)}-#{nth($name, 2)} { | |
// background-image: url(#{nth($name, 1)}-#{nth($name, 2)}.png); | |
// } | |
//} | |
// this works becuase the dash stops it trying to do maths: | |
@each $name in $authors { | |
.name.#{nth($name, 1)}-#{nth($name, 2)} { | |
background-image: url(#{nth($name, 1)}#{nth($name, 2)}.png); | |
} | |
} | |
// workaround: | |
@each $name in $authors { | |
$firstname: #{nth($name, 1)}; | |
$secondname: #{nth($name, 2)}; | |
.fullname.#{$firstname}-#{$secondname} { | |
background-image: url(#{$firstname}#{$secondname}.png); | |
} | |
} | |
This file contains 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
.firstname.Markus-Huber { | |
background-image: url(Markus.png); } | |
.firstname.Jasmin-Pakbeen { | |
background-image: url(Jasmin.png); } | |
.firstname.Richard-Wiltshire { | |
background-image: url(Richard.png); } | |
.firstname.Ishaq-Siddiqi { | |
background-image: url(Ishaq.png); } | |
.firstname.Mark-Priest { | |
background-image: url(Mark.png); } | |
.firstname.Joe-Rundle { | |
background-image: url(Joe.png); } | |
.firstname.Lucas-Rouxdeluze { | |
background-image: url(Lucas.png); } | |
.firstname.Adrien-Cohen { | |
background-image: url(Adrien.png); } | |
.firstname.Monira-Lor { | |
background-image: url(Monira.png); } | |
.firstname.Max-Stigliano { | |
background-image: url(Max.png); } | |
.name.Markus-Huber { | |
background-image: url(MarkusHuber.png); } | |
.name.Jasmin-Pakbeen { | |
background-image: url(JasminPakbeen.png); } | |
.name.Richard-Wiltshire { | |
background-image: url(RichardWiltshire.png); } | |
.name.Ishaq-Siddiqi { | |
background-image: url(IshaqSiddiqi.png); } | |
.name.Mark-Priest { | |
background-image: url(MarkPriest.png); } | |
.name.Joe-Rundle { | |
background-image: url(JoeRundle.png); } | |
.name.Lucas-Rouxdeluze { | |
background-image: url(LucasRouxdeluze.png); } | |
.name.Adrien-Cohen { | |
background-image: url(AdrienCohen.png); } | |
.name.Monira-Lor { | |
background-image: url(MoniraLor.png); } | |
.name.Max-Stigliano { | |
background-image: url(MaxStigliano.png); } | |
.fullname.Markus-Huber { | |
background-image: url(MarkusHuber.png); } | |
.fullname.Jasmin-Pakbeen { | |
background-image: url(JasminPakbeen.png); } | |
.fullname.Richard-Wiltshire { | |
background-image: url(RichardWiltshire.png); } | |
.fullname.Ishaq-Siddiqi { | |
background-image: url(IshaqSiddiqi.png); } | |
.fullname.Mark-Priest { | |
background-image: url(MarkPriest.png); } | |
.fullname.Joe-Rundle { | |
background-image: url(JoeRundle.png); } | |
.fullname.Lucas-Rouxdeluze { | |
background-image: url(LucasRouxdeluze.png); } | |
.fullname.Adrien-Cohen { | |
background-image: url(AdrienCohen.png); } | |
.fullname.Monira-Lor { | |
background-image: url(MoniraLor.png); } | |
.fullname.Max-Stigliano { | |
background-image: url(MaxStigliano.png); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment