You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

prettier-plugin-css-order

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-css-order

Sort CSS declarations in a certain order.

2.1.2
latest
Source
npmnpm
Version published
Weekly downloads
71K
2.57%
Maintainers
1
Weekly downloads
 
Created
Source

CSS Order Prettier Plugin

npm

A Prettier plugin to sort CSS, SCSS or Less declarations based on their property names.
Using css-declaration-sorter under the hood.

Usage

Following the Prettier plugin guidelines, this package depends on Prettier as a peer dependency:
npm install postcss prettier-plugin-css-order --save-dev

To enable the plugin use the Prettier API, CLI or configuration file. For example using the JS configuration:

{
  plugins: ["prettier-plugin-css-order"]
}

Configuration

This plugin adds two configurable keys to Prettier:

  • cssDeclarationSorterOrder defaults to concentric-css.
  • cssDeclarationSorterKeepOverrides defaults to true, for a new codebase false is recommended.
  • cssDeclarationSorterCustomOrder, an array of property names, their order is used to sort with. This overrides the cssDeclarationSorterOrder option!

Keywords

prettier

FAQs

Package last updated on 01 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts