hudochenkov / postcss-sorting

PostCSS plugin to keep rules and at-rules content in order.
MIT License
516 stars 30 forks source link

Compine at rules with properties in sorting #89

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi everyone, In my sass workflow I use a lot of mixins (positioning, shapes, flexbox ecc). I would like instead of put these mixins above or under my properties to combine them together. I will try to explain better. Take this code:

 .value {
    padding: 3.5rem;
    @include relative(top 0);
    transition-property: transform, opacity, top !important;
@include flexbox-layout(items-center, justify-center, grow-1);
  }

Running postcss sorting will result:

 .value {
@include flexbox-layout(items-center, justify-center, grow-1);
    @include relative(top 0);
    padding: 3.5rem;
    transition-property: transform, opacity, top !important;
  }

Instead, I would like to combine the order of these at-rules and properties, something like this:

 .value {
@include flexbox-layout(items-center, justify-center, grow-1);
    padding: 3.5rem;
@include relative(top 0);
    transition-property: transform, opacity, top !important;
  }

Is this possible to implement?

hudochenkov commented 4 years ago

I'm afraid it's not possible with this plugin. And I don't have plans to make it possible.