UNPKG

motion

Version:

motion - moving development forward

79 lines (78 loc) 4.18 kB
{ "_args": [ [ "postcss-zindex@https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.0.1.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "postcss-zindex@>=2.0.0 <3.0.0", "_id": "postcss-zindex@2.0.1", "_inCache": true, "_location": "/postcss-zindex", "_phantomChildren": {}, "_requested": { "name": "postcss-zindex", "raw": "postcss-zindex@https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.0.1.tgz", "rawSpec": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.0.1.tgz", "scope": null, "spec": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.0.1.tgz", "type": "remote" }, "_requiredBy": [ "/cssnano" ], "_resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.0.1.tgz", "_shasum": "1c9b22269691a87557f7565dfe6e3b8473e530bc", "_shrinkwrap": null, "_spec": "postcss-zindex@https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.0.1.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "beneb.info@gmail.com", "name": "Ben Briggs", "url": "http://beneb.info" }, "bugs": { "url": "https://github.com/ben-eb/postcss-zindex/issues" }, "dependencies": { "postcss": "^5.0.4", "uniqs": "^2.0.0" }, "description": "Reduce z-index values with PostCSS.", "devDependencies": { "jshint": "^2.8.0", "jshint-stylish": "^2.0.1", "tap-spec": "^4.1.0", "tape": "^4.2.0" }, "files": [ "LICENSE-MIT", "index.js", "lib" ], "homepage": "https://github.com/ben-eb/postcss-zindex", "keywords": [ "css", "normalize", "optimisation", "optimise", "postcss", "postcss-plugin", "z-index" ], "license": "MIT", "main": "index.js", "name": "postcss-zindex", "optionalDependencies": {}, "readme": "# [postcss][postcss]-zindex [![Build Status](https://travis-ci.org/ben-eb/postcss-zindex.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-zindex.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-zindex.svg)][deps]\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`. Be careful with using this module alongside JavaScript injected\nCSS; ideally you should have already extracted all of your stacking context\ninto CSS.\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributing\n\nPull requests are welcome. If you add functionality, then please add unit tests\nto cover it.\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n[ci]: https://travis-ci.org/ben-eb/postcss-zindex\n[deps]: https://gemnasium.com/ben-eb/postcss-zindex\n[npm]: http://badge.fury.io/js/postcss-zindex\n[postcss]: https://github.com/postcss/postcss\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/ben-eb/postcss-zindex.git" }, "scripts": { "lint": "jshint index.js lib/*.js --reporter node_modules/jshint-stylish/stylish.js", "test": "tape test.js | tap-spec" }, "version": "2.0.1" }