postcss-format-less-mixins

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i postcss-format-less-mixins

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • frontendauteur