1. postcss-format-less-mixins
PostCSS plugin to format Less mixin calls where Stylefmt fails
postcss-format-less-mixins
Package: postcss-format-less-mixins
Created by: frontendauteur
Last modified: Fri, 24 Jun 2022 10:01:59 GMT
Version: 1.0.0
License: MIT
Downloads: 5
Repository: https://github.com/frontendauteur/postcss-format-less-mixins

Install

npm install postcss-format-less-mixins
yarn add postcss-format-less-mixins

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.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin