0

The following mixin Sass code works just fine:

@mixin test($attr, $radius) {
    hey :blah + $attr;
}

I can set the $attr parameter to foo and the output will be

hey: blahfoo

But the following code doesn't work:

@mixin test($attr, $radius) {
    hey + $attr :blah;
}

It just throws a syntax error. How can I do string concatenation for the property names, just like I can do for the values?

J-bob
  • 8,380
  • 11
  • 52
  • 85
  • Also related: http://stackoverflow.com/questions/10752746/sass-simplify-a-mixin-with-prefixes – cimmanon May 18 '15 at 18:21
  • Ah great, I assumed this had been addressed before, but my googling skills could not discover this one. Thanks! – J-bob May 18 '15 at 18:50

0 Answers0