Search code examples
sassgulpgulp-sass

There is a way to order alphabetical in Gulp Sass?


My team hates a convention that we need to use. We need to export all css in alphabetical order, but we can work in our SCSS and we don't need to share it, so what its matters is css being orderded.

There is a way in gulp (we work with gulp-sass) to reorder when css is processed?

Note: I think alphabetical order is horrible even to readibility, its better to group by type (eg: box-model properties, text properties, ...)


Solution

  • You need

    gulp-csscomb

    Probably with this option after you have your css:

    .pipe(csscomb({"sort-order-fallback": "abc"}))
    

    See sort-order configuration for csscomb