postcss/postcss-mixins

Escape comma in mixin parameters?

ColCh opened this issue · 2 comments

ColCh commented

I just wanted to use mixin for animation-name property

@define mixin animations $names { animation-name: $names; }
// ... 
@mixin animations first, second

it seems that it's not possible?

params = postcss.list.comma(rest);

https://github.com/postcss/postcss/blob/fa8400163f0b163b70cbd91695cca7c04d35d447/lib/list.es6#L83-L86

ColCh commented

ahh sorry just figured out to use variables

https://github.com/postcss/postcss-simple-vars

@define mixin animations $names { animation-name: $names; }
// ... 
$foo-names: first, second;
// ...
@mixin animations $foo-names;
ColCh commented

Closing now since this issue is not really related to current project