2.0.2 • Published 4 months ago
brandeur-plugin-sort-property v2.0.2
brandeur-plugin-sort-property
Sorts properties according to a property priority map.
Installation
# npm
npm i --save brandeur-plugin-sort-property
# yarn
yarn add brandeur-plugin-sort-property
# pnpm
pnpm add brandeur-plugin-sort-property
Usage
import sortProperty from 'brandeur-plugin-sort-property'
const plugin = sortProperty({
paddingTop: 2,
paddingRight: 2,
paddingBottom: 2,
paddingLeft: 2,
})
Configuration
Parameter | Type | Description |
---|---|---|
priorityMap | PriorityMap | A map of CSS properties and their sorting priority. Default priority is 1 |
PriorityMap
Record<keyof CSSProperties, number>
Input
Using the example configuration from above.
{
paddingLeft: 5,
padding: 10,
}
Output
{
padding: 10,
paddingLeft: 5,
}
License
Brandeur is licensed under the MIT License. Documentation is licensed under Creative Commons License. Created with ♥ by @robinweser.