postcss / postcss-mixins

PostCSS plugin for mixins
MIT License
466 stars 47 forks source link

Mixin argument with spread operator #103

Closed coolemur closed 4 years ago

coolemur commented 4 years ago

Hi. Looks like this feature is missing:

@mixin myMixin($param...) {
   css-rule: $param; 
}

https://www.sitepoint.com/sass-multiple-arguments-lists-or-arglist/

ai commented 4 years ago

You can do it with JS based mixins.

By design we try to keep CSS based mixins simple and declarative (having JS mixins for complicated cases). To add some complex feature to CSS mixin, I need a good reason for it.

I will reopen issue of your will show a good reason (but I really recommend to keep complex logic in proper programming language).