0
$list: adam john wynn mason kuroir

=author-images
  @each $author in $list
    .photo-#{$author}
      background: image-url("avatars/#{$author}.png") no-repeat;

.author-bio
  +author-images

Does anyone know why this code sample from http://thesassway.com/intermediate/if-for-each-while is not compiling correctly in SASSMeister?

http://sassmeister.com/gist/b76fdc61130135864989

LNA
  • 1,427
  • 3
  • 24
  • 37
  • Hint: you're mixing syntaxes. – cimmanon Nov 09 '14 at 12:06
  • $list: adam john wynn mason kuroir; =author-images { @each $author in $list{ .photo-#{$author} { background: image-url("avatars/#{$author}.png") no-repeat; } } } .author-bio { +author-images } – LNA Nov 09 '14 at 17:39
  • Still couldn't quite get this to work. – LNA Nov 09 '14 at 17:39
  • As I already stated, you are mixing syntaxes. I suggest you take the time to look over the official Sass documentation. – cimmanon Nov 09 '14 at 18:34
  • Oh, I see! No wonder it did not look familiar. "=" is a mixin and "+" is an include. – LNA Nov 09 '14 at 20:03

0 Answers0