{
  "manifest": {
    "name": "css-declaration-sorter",
    "version": "6.4.1",
    "description": "Sorts CSS declarations fast and automatically in a certain order.",
    "type": "module",
    "main": "./dist/main.cjs",
    "exports": {
      "import": "./src/main.mjs",
      "require": "./dist/main.cjs"
    },
    "types": "./src/main.d.ts",
    "files": [
      "src/main.mjs",
      "src/main.d.ts",
      "src/shorthand-data.mjs",
      "src/bubble-sort.mjs",
      "orders",
      "dist"
    ],
    "scripts": {
      "build": "rollup -c",
      "preversion": "npm test",
      "test": "uvu src .+\\.test\\.mjs",
      "test:ci": "npm test && npm run lint -- --max-warnings 0",
      "lint": "eslint src/*.mjs",
      "scrape": "node --experimental-import-meta-resolve src/property-scraper.mjs",
      "prepack": "npm run build"
    },
    "devDependencies": {
      "@mdn/browser-compat-data": "^5.2.23",
      "@rollup/plugin-dynamic-import-vars": "^2.0.2",
      "@rollup/plugin-replace": "^5.0.2",
      "eslint": "^8.35.0",
      "postcss": "^8.4.18",
      "rollup": "^3.15.0",
      "uvu": "^0.5.6"
    },
    "peerDependencies": {
      "postcss": "^8.0.9"
    },
    "engines": {
      "node": "^10 || ^12 || >=14"
    },
    "repository": {
      "type": "git",
      "url": "https://github.com/Siilwyn/css-declaration-sorter.git"
    },
    "author": {
      "name": "Selwyn",
      "email": "talk@selwyn.cc",
      "url": "https://selwyn.cc/"
    },
    "license": "ISC",
    "keywords": [
      "postcss",
      "postcss-plugin",
      "css",
      "declaration",
      "sorter",
      "property",
      "order"
    ],
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-css-declaration-sorter-6.4.1-28beac7c20bad7f1775be3a7129d7eae409a3a71-integrity/node_modules/css-declaration-sorter/package.json",
    "readmeFilename": "readme.md",
    "readme": "<img alt='CSS declaration sorter logo' src='https://raw.githubusercontent.com/Siilwyn/css-declaration-sorter/master/logo.svg?sanitize=true' height='260' align='right'>\n\n# CSS Declaration Sorter\n[![npm][npm-badge]][npm]\n\nA Node.js module and [PostCSS] plugin to sort CSS, SCSS or Less declarations based on their property names. Ensuring styling is organized, more consistent and in order... The goal of this package is to sort the source code of a project in the build process or to decrease the distributed CSS gzipped size.\n\nCheck out [the Prettier plugin](https://github.com/Siilwyn/prettier-plugin-css-order) for usage with a variety of file formats.\n\n## Niceness\n- Up-to-date CSS properties fetched from the [MDN Compatibility Data](https://github.com/mdn/browser-compat-data/) project.\n- Choose your wanted order or provide your own.\n- Nested rules sorting support.\n- SCSS and Less support when combined with either [postcss-scss](https://github.com/postcss/postcss-scss) or [postcss-less](https://github.com/webschik/postcss-less).\n- Thought-out sorting orders out of the box, **approved by their authors**.\n\n## Alphabetical example\nInput:\n```css\nbody {\n    display: block;\n    animation: none;\n    color: #C55;\n    border: 0;\n}\n```\n\nOutput:\n```css\nbody {\n    animation: none;\n    border: 0;\n    color: #C55;\n    display: block;\n}\n```\n\n## Built-in sorting orders\n- Alphabetical  \n`alphabetical`  \n*Default, order in a simple alphabetical manner from a - z.*\n\n- [SMACSS](http://smacss.com/book/formatting#grouping)  \n`smacss`  \n*Order from most important, flow affecting properties, to least important properties.*\n  1. Box\n  2. Border\n  3. Background\n  4. Text\n  5. Other\n\n- [Concentric CSS](https://github.com/brandon-rhodes/Concentric-CSS)  \n`concentric-css`  \n*Order properties applying outside the box model, moving inward to intrinsic changes.*\n  1. Positioning\n  2. Visibility\n  3. Box model\n  4. Dimensions\n  5. Text\n\n## Usage\nFollowing the PostCSS plugin guidelines, this package depends on PostCSS as a peer dependency:  \n`npm install postcss css-declaration-sorter --save-dev`\n\n### CLI\nThis module does not include its own CLI but works with the official [PostCSS CLI](https://github.com/postcss/postcss-cli). To use the examples below, the `postcss-cli` package is a required dependency.\n\nPiping out result from file:  \n`postcss input.css --use css-declaration-sorter | cat`\n\nSorting multiple files by overwriting:  \n`postcss *.css --use css-declaration-sorter --replace --no-map`\n\nSorting all files in a directory with SCSS syntax using [postcss-scss](https://github.com/postcss/postcss-scss) by overwriting:  \n`postcss ./src/**/*.scss --syntax postcss-scss --use css-declaration-sorter --replace --no-map`\n\nSorting all files in the directory with SCSS syntax and SMACSS order by overwriting, using `package.json` configuration:  \n```json\n\"postcss\": {\n  \"syntax\": \"postcss-scss\",\n  \"map\": false,\n  \"plugins\": {\n    \"css-declaration-sorter\": { \"order\": \"smacss\" }\n  }\n}\n```\n\n`postcss ./src/**/*.scss --replace --config package.json`\n\n### Vanilla JS\n```js\nimport postcss from 'postcss';\nimport { cssDeclarationSorter } from 'css-declaration-sorter';\n\npostcss([cssDeclarationSorter({ order: 'smacss' })])\n  .process('a { color: hyperblue; display: block; }', { from: undefined })\n  .then(result => console.log(\n    result.css === 'a { display: block; color: hyperblue; }'\n  ));\n```\n___\n\n**[View more usage examples](/examples) in combination with other tools.**  \n\n___\n\n## API\n### cssDeclarationSorter({ order, keepOverrides })\n\n#### order\nType: `string` or `function`  \nDefault: `alphabetical`  \nOptions: `alphabetical`, `smacss`, `concentric-css`\n\nProvide the name of one of the built-in sort orders or a comparison function that is passed to ([`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)). This function receives two declaration names and is expected to return `-1`, `0` or `1` depending on the wanted order.\n\n#### keepOverrides\nType: `Boolean`  \nDefault: `false`  \n\nTo prevent breaking legacy CSS where shorthand declarations override longhand declarations (also taking into account vendor prefixes) this option can enabled. For example `animation-name: some; animation: greeting;` will be kept in this order when `keepOverrides` is `true`.\n\n[PostCSS]: https://github.com/postcss/postcss\n\n[npm]: https://www.npmjs.com/package/css-declaration-sorter\n[npm-badge]: https://tinyshields.dev/npm/css-declaration-sorter.svg\n",
    "licenseText": "ISC License\n\nCopyright (c)\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz#28beac7c20bad7f1775be3a7129d7eae409a3a71",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz",
    "hash": "28beac7c20bad7f1775be3a7129d7eae409a3a71",
    "integrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==",
    "registry": "npm",
    "packageName": "css-declaration-sorter",
    "cacheIntegrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g== sha1-KL6sfCC61/F3W+OnEp1+rkCaOnE="
  },
  "registry": "npm",
  "hash": "28beac7c20bad7f1775be3a7129d7eae409a3a71"
}