Install
PostCSS Format Less Mixins
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.