Skip to content

Instantly share code, notes, and snippets.

@lunelson
Created July 6, 2015 06:25
Show Gist options
  • Select an option

  • Save lunelson/42721e5cddcc13d1f386 to your computer and use it in GitHub Desktop.

Select an option

Save lunelson/42721e5cddcc13d1f386 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
p.red red
p.orange orange
p.yellow yellow
p.green green
p.blue1 blue1
p.blue2 blue2
p.purple1 purple1
p.purple2 purple2
// ----
// libsass (v3.2.5)
// ----
@import "sass-list-maps";
$variant: 'us';
$_lotteries: (
us (us-powerball, mega-millions)
);
@each $variant in $_lotteries {
$variant-lotteries: map-get-z($_lotteries, #{map-keys($variant)});
// It will not loop over each lottery for the us variant
@each $lottery in $variant-lotteries {
.test {
lottery: $lottery;
}
}
}
.test {
lottery: us-powerball;
}
.test {
lottery: mega-millions;
}
<p class="red">red</p>
<p class="orange">orange</p>
<p class="yellow">yellow</p>
<p class="green">green</p>
<p class="blue1">blue1</p>
<p class="blue2">blue2</p>
<p class="purple1">purple1</p>
<p class="purple2">purple2</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment