Files
est-frame/node_modules/postcss-zindex/package.json
2025-10-22 05:38:27 +00:00

42 lines
2.9 KiB
JSON
Executable File

{
"name": "postcss-zindex",
"version": "5.1.0",
"description": "Reduce z-index values with PostCSS.",
"main": "src/index.js",
"types": "types/index.d.ts",
"files": [
"LICENSE-MIT",
"src",
"types"
],
"keywords": [
"css",
"normalize",
"optimise",
"optimisation",
"postcss",
"postcss-plugin",
"z-index"
],
"license": "MIT",
"homepage": "https://github.com/cssnano/cssnano",
"author": {
"name": "Ben Briggs",
"email": "beneb.info@gmail.com",
"url": "http://beneb.info"
},
"repository": "cssnano/cssnano",
"bugs": {
"url": "https://github.com/cssnano/cssnano/issues"
},
"engines": {
"node": "^10 || ^12 || >=14.0"
},
"devDependencies": {
"postcss": "^8.2.15"
},
"peerDependencies": {
"postcss": "^8.2.15"
},
"readme": "# [postcss][postcss]-zindex\n\n> Reduce z-index values with PostCSS.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-zindex) do:\n\n```\nnpm install postcss-zindex --save\n```\n\n## Example\n\nSometimes, you may introduce z-index values into your CSS that are larger than\nnecessary, in order to improve your understanding of how each stack relates to\nthe others. For example, you might have a modal overlay at `5000` and the dialog\nfor it at `5500` - so that modal classes occupy the `5xxx` space.\n\nBut in production, it is unnecessary to use such large values for z-index where\nsmaller values would suffice. This module will reduce all z-index declarations\nwhilst respecting your original intent; such that the overlay becomes `1` and\nthe dialog becomes `2`. For more examples, see the [tests](test.js).\n\n### Input\n\n```css\n.modal {\n z-index: 5000\n}\n\n.modal-overlay {\n z-index: 5500\n}\n```\n\n### Output\n\n```css\n.modal {\n z-index: 1\n}\n\n.modal-overlay {\n z-index: 2\n}\n```\n\nNote that this module does not attempt to normalize relative z-index values,\nsuch as `-1`; indeed, it will abort immediately when encountering these values\nas it cannot be sure that rebasing mixed positive & negative values will keep\nthe stacking context intact. Be careful with using this module alongside\nJavaScript injected CSS; ideally you should have already extracted all of your\nstacking context into CSS.\n\n## API\n\n### zindex([options])\n\n#### options\n\n##### startIndex\n\nType: `number`\nDefault: `1`\n\nSet this to any other positive integer if you want to override z-indices from\nother sources outside your control. For example if a third party widget has a\nmaximum z-index of `99`, you can set this to `100` and not have to worry about\nstacking conflicts.\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n[postcss]: https://github.com/postcss/postcss\n"
}