stylelint-config-pretty-order
v0.7.0
Published
Prettify CSS property order
Downloads
348
Maintainers
Readme
stylelint-config-pretty-order
StyleLint config that prettifies CSS property order with stylelint-order.
Features
Grouping
This config sorts properties based on the following group:
- Position - e.g.,
top
,right
,inset
,z-index
,float
- Layout - e.g.,
display
,width
,height
,margin
,padding
,border
,grid
,flex
, - Render - e.g.,
content-visibility
,contain
- Overflow & Scroll - e.g.,
overflow
,scroll-behavior
- Typography - e.g.,
font
,text-align
,white-space
- Appearance - e.g.,
opacity
,color
,background
,outline
,filter
- Transform & Animation - e.g.,
translate
,animation
,transition
- Misc - e.g.,
cursor
,content
To check the complete property order, see test.css.
Supports new properties
This config supports newly added CSS properties, such as:
- Logical properties
- Individual transform properties
- Container queries
- Scroll driven animation
- Initial letter
and so on.
Installation
Install stylelint and this package according to the package manager:
npm i -D stylelint stylelint-config-pretty-order
yarn add --dev stylelint stylelint-config-pretty-order
pnpm add -D stylelint stylelint-config-pretty-order
bun add -D stylelint stylelint-config-pretty-order
Usage
Add the following setting to your config:
{
"extends": "stylelint-config-pretty-order"
}
Development
- Clone this repository
- Install dependencies using
bun install
License
MIT