Skip to content

Instantly share code, notes, and snippets.

@storypixel
Created October 15, 2015 13:24
Show Gist options
  • Save storypixel/5384d748ae93ff654755 to your computer and use it in GitHub Desktop.
Save storypixel/5384d748ae93ff654755 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$small: "tall";
$medium: "grande";
$large: "venti";
$prices: (
small: 8,
medium: 10,
large: 12
);
@mixin test($p) {
font-size: $p;
}
/* I want the below to spit out the values of $small, $medium, and $large... not the variable symbol */
@each $size, $price in $prices {
.what-#{$size} {
@include test(unquote('$'+'#{$size}'));
}
}
/* I want the below to spit out the values of $small, $medium, and $large... not the variable symbol */
.what-small {
font-size: $small;
}
.what-medium {
font-size: $medium;
}
.what-large {
font-size: $large;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment