1.0.0 • Published 7 years ago

postcss-format-less-mixins v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

PostCSS Format Less Mixins Build Status

PostCSS plugin to format Less mixin calls where stylefmt fails.

Installation

npm install postcss-format-less-mixins

Example

/* Input Example */
.a {

    .myMixin()
    ;
}
.b {
    background: rebeccapurple;

    .myMixin()
    ;
}
.c {
    .myOtherMixin()
    ;

    .myMixin()
    ;
}
.d {

    .myOtherMixin()
    ;

    .myMixin()
    ;
}
.e {
    background: rebeccapurple;

    .f {
        background: transparent;

        .myMixin()
        ;
    }
}
/* Output Example */
.a {
    .myMixin();
}
.b {
    background: rebeccapurple;
    .myMixin();
}
.c {
    .myOtherMixin();
    .myMixin();
}
.d {
    .myOtherMixin();
    .myMixin();
}
.e {
    background: rebeccapurple;

    .f {
        background: transparent;
        .myMixin();
    }
}

Usage

postcss([
    require('postcss-format-less-mixins')
]).process(YOUR_LESS, {
    syntax: require('postcss-less')
})

Use Stylefmt before using this plugin.