prettier-plugin-csssort

0.0.1 • Public • Published

prettier-plugin-csssort

License npm version

A Prettier plugin that sorts and groups CSS properties.

Installation

Prettier plugins are automatically loaded if installed in the same node_modules directory as Prettier itself is installed.

Read more about Prettier plugins.

FAQ

  1. How are the properties sorted/grouped?

    lib/config.js defines how properties are sorted and grouped. The configuration was inherited from CSSComb.

  2. Can I change the way properties are sorted/grouped?

    Not at this moment. Feel free to open a pull-request.

Warning

This plugin utilizes PostCSS and the postcss-sorting plugin to do the heavy lifting. In essence, this Prettier plugin is a very thin wrapper over the afformentioned tools.

Prettier's plugin infrastructure is still in beta and under construction. Once stabilized, it might be better to implement sorting and grouping directly in this plugin. This should be more efficient since Prettier already parses the CSS into a AST using PostCSS under the hood.

/prettier-plugin-csssort/

    Package Sidebar

    Install

    npm i prettier-plugin-csssort

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    17.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • photonios