Generated by SassMeister.com.
<div class="box">I'm a box.</div>
/*I need the color here to be the output of darken(#0074d9,10%), not a string that lacks (). */
.box {
color: #0059a6;
color: darken #0074d9, 10%;
}
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
$blue: #0074d9;
$variants: (
dark: (darken, 11%),
);
$variant: dark;
@function c($color, $variant) {
$prefix: nth(map-get($variants, $variant), 1);
$value: nth(map-get($variants, $variant), 2);
@return $prefix(#{$color}, #{$value});
}
/*I need the color here to be the output of darken(#0074d9,10%), not a string that lacks (). */
.box {
color: darken(#0074d9, 10%);
color: c($blue, dark);
}
<div class="box">I'm a box.</div>