Skip to content

Sass sorting by mixins #532

@fantomtracks

Description

@fantomtracks

Hello,
I post new issue requested by @AiBoy on #356. I use csscomb v.4.2.0.
I can't sort mixins in the order I want. For exemple, I have this scss file :

body {
  display: block;
  @include clearfix();
  @include font-size(12px);
}

And I have this sort-order configuration in my .csscomb.json :

"sort-order": [
    [
      "$include clearfix",
      "display",
      "$include size"
    ]
  ]

So what I want is have @include clearfix(); before display:block propriety, and @include font-size(12px); after display:block propriety.

But when I run csscomb, my scss file look like this :

body {
  display: block;

  @include clearfix();
  @include font-size(12px);
}

All @ include proprieties are group toghter at the end of the file. It's not that I want :/
There is a way to sort order mixin by name with csscomb ?

Thank for your time :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions