Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

mycsHQ/postcss-sort-alphabetically

Repository files navigation

PostCSS Sort Alphabetically Build Status semantic-versioning semantic-release npm

PostCSS plugin which sorts css properties alphabetically.

    /* Input example */
    a{
        border: 1px solid black;
        color: red;
        background-color: red;
    }
    div{
        padding: 10px;
        margin: 20px;
        color: red;
        background-color: red;
    }
    .class {
        flex: 1;
        display-flex: 10px;
    }
    #some {
        background-image: url('something');
        align-items: center;
    }
  /* Output example */
   a{
        background-color: red;
        border: 1px solid black;
        color: red;
    }
    div{
        background-color: red;
        color: red;
        margin: 20px;
        padding: 10px;
    }
    .class {
        display-flex: 10px;
        flex: 1;
    }
    #some {
        align-items: center;
        background-image: url('something');
    }

Usage

postcss([ require('postcss-sort-alphabetically') ])

See PostCSS docs for examples for your environment.

Contributing

forthebadge

Feel free to open issues, make suggestions or send PRs. This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.