{"maintainers":[{"name":"pascalduez","email":"public@pascalduez.me"}],"keywords":["css","quantity-queries","postcss","postcss-plugin"],"dist-tags":{"latest":"0.4.0"},"author":{"name":"Pascal Duez","url":"https://github.com/pascalduez"},"description":"PostCSS plugin enabling quantity-queries","readme":"# postcss-quantity-queries\n\n[![npm version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\n\n> [PostCSS] plugin enabling quantity-queries.\n\nThis plugin is derived from the Sass [Quantity Queries mixins] by Daniel Guillan.  \nFor informations about quantity queries check those resources:  \n[Quantity Queries for CSS][]  \n[Styling elements based on sibling count][]  \n[Daniel’s demo on CodePen][]  \n\n\n\n## Installation\n\n```\nnpm install postcss-quantity-queries --save-dev\n```\n\n\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar postcss = require('postcss');\nvar quantityQueries = require('postcss-quantity-queries');\n\nvar css = fs.readFileSync('input.css', 'utf8');\n\nvar output = postcss()\n  .use(quantityQueries())\n  .process(css)\n  .css;\n```\n\n\n\n## API\n\n### at-least\n\nTarget `count` items or more:\n```css\n:at-least(count) { ... }\n```\ninput:\n```css\nul > li:at-least(4) {\n  color: rebeccapurple;\n}\n```\noutput:\n```css\nul > li:nth-last-child(n+4),\nul > li:nth-last-child(n+4) ~ li {\n  color: rebeccapurple;\n}\n```\n\n\n\n### at-most\n\nTarget `count` items or less:\n```css\n:at-most(count) { ... }\n```\ninput:\n```css\nul > li:at-most(4) {\n  color: rebeccapurple;\n}\n```\noutput:\n```css\nul > li:nth-last-child(-n+4):first-child,\nul > li:nth-last-child(-n+4):first-child ~ li {\n  color: rebeccapurple;\n}\n```\n\n\n\n### between\n\nTarget a range of items between `start` and `end`:\n```css\n:between(start, end) { ... }\n```\ninput:\n```css\nul > li:between(4, 6) {\n  color: rebeccapurple;\n}\n```\noutput:\n```css\nul > li:nth-last-child(n+4):nth-last-child(-n+6):first-child,\nul > li:nth-last-child(n+4):nth-last-child(-n+6):first-child ~ li {\n  color: rebeccapurple;\n}\n```\n\n\n\n### exactly\n\nTarget exactly `count` items:\n```css\n:exactly(count) { ... }\n```\ninput:\n```css\nul > li:exactly(4) {\n  color: rebeccapurple;\n}\n```\noutput:\n```css\nul > li:nth-last-child(4):first-child,\nul > li:nth-last-child(4):first-child ~ li {\n  color: rebeccapurple;\n}\n```\n\n### All pseudo-selector extensions\n\nSelector | Description\n---|---\n[#](#at-least) `:at-least(count) { … }` | Target `count` items or more\n[#](#at-most) `:at-most(count) { … }` | Target `count` items or less\n[#](#between) `:between(start, end) { … }` | Target a range of items between `start` and `end`\n[#](#exactly) `:exactly(count) { … }` | Target exactly `count` items\n\n## At-rule API\n\nThere is also an at-rule API, similar to pre-processors.  \nAlthough the recommended API is the pseudo-selectors one.\n\n```css\n@at-least count [, selector] { ... }\n```\n```css\n@at-most count [, selector] { ... }\n```\n```css\n@between start end [, selector] { ... }\n```\n```css\n@exactly count [, selector] { ... }\n```\n\n```css\nul > li {\n  @at-least 4 span {\n    color: rebeccapurple;\n  }\n}\n\nul > li {\n  @between 4 6 {\n    color: rebeccapurple;\n  }\n}\n```\n\nCheck out the [tests](test/fixtures) for more examples.\n\n\n\n## Credits\n\n* [Pascal Duez](https://twitter.com/pascalduez)\n\n\n## Licence\n\npostcss-quantity-queries is [unlicensed](http://unlicense.org/).\n\n\n\n[PostCSS]: https://github.com/postcss/postcss\n[Quantity Queries mixins]: https://github.com/danielguillan/quantity-queries\n[Quantity Queries for CSS]: http://alistapart.com/article/quantity-queries-for-css\n[Styling elements based on sibling count]: http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3\n[Daniel’s demo on CodePen]: http://codepen.io/danielguillan/pen/GgBOxm\n\n[npm-url]: https://www.npmjs.org/package/postcss-quantity-queries\n[npm-image]: http://img.shields.io/npm/v/postcss-quantity-queries.svg?style=flat-square\n[travis-url]: https://travis-ci.org/pascalduez/postcss-quantity-queries?branch=master\n[travis-image]: http://img.shields.io/travis/pascalduez/postcss-quantity-queries.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/pascalduez/postcss-quantity-queries\n[coveralls-image]: https://img.shields.io/coveralls/pascalduez/postcss-quantity-queries.svg?style=flat-square\n[depstat-url]: https://david-dm.org/pascalduez/postcss-quantity-queries\n[depstat-image]: https://david-dm.org/pascalduez/postcss-quantity-queries.svg?style=flat-square\n[license-image]: http://img.shields.io/npm/l/postcss-quantity-queries.svg?style=flat-square\n[license-url]: UNLICENSE\n","repository":{"type":"git","url":"git://github.com/pascalduez/postcss-quantity-queries.git"},"users":{"danielbayley":true,"phritolay":true},"bugs":{"url":"https://github.com/pascalduez/postcss-quantity-queries/issues"},"license":"Unlicense","versions":{"0.1.0":{"name":"postcss-quantity-queries","version":"0.1.0","description":"PostCSS plugin enabling quantity-queries","keywords":["css","quantity-queries","postcss","postcss-plugins"],"author":{"name":"Pascal Duez","url":"https://github.com/pascalduez"},"homepage":"https://github.com/pascalduez/postcss-quantity-queries","bugs":{"url":"https://github.com/pascalduez/postcss-quantity-queries/issues"},"repository":{"type":"git","url":"git://github.com/pascalduez/postcss-quantity-queries.git"},"license":{"type":"unlicence","url":"http://unlicense.org"},"files":["dist","CHANGELOG.md","index.js","README.md","UNLICENSE"],"dependencies":{"postcss":"^4.0.6"},"devDependencies":{"babel":"^4.7.3","babel-eslint":"^1.0.14","coveralls":"^2.11.2","eslint":"^0.16.1","faucet":"0.0.1","istanbul":"^0.3.7","tape":"^3.5.0"},"scripts":{"test":"make dist test"},"gitHead":"c1c29454bb3b2b552d696de45bc23fe659125d01","_id":"postcss-quantity-queries@0.1.0","_shasum":"2fc73645839db49c0d3295d214bc174f6251c327","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"pascalduez","email":"public@pascalduez.me"},"maintainers":[{"name":"pascalduez","email":"public@pascalduez.me"}],"dist":{"shasum":"2fc73645839db49c0d3295d214bc174f6251c327","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-quantity-queries/-/postcss-quantity-queries-0.1.0.tgz"},"directories":{}},"0.2.0":{"name":"postcss-quantity-queries","version":"0.2.0","description":"PostCSS plugin enabling quantity-queries","keywords":["css","quantity-queries","postcss","postcss-plugins"],"author":{"name":"Pascal Duez","url":"https://github.com/pascalduez"},"homepage":"https://github.com/pascalduez/postcss-quantity-queries","bugs":{"url":"https://github.com/pascalduez/postcss-quantity-queries/issues"},"repository":{"type":"git","url":"git://github.com/pascalduez/postcss-quantity-queries.git"},"license":{"type":"unlicence","url":"http://unlicense.org"},"files":["dist","CHANGELOG.md","index.js","README.md","UNLICENSE"],"dependencies":{"balanced-match":"^0.2.0","postcss":"^4.0.6"},"devDependencies":{"babel":"^4.7.8","babel-eslint":"^2.0.0","coveralls":"^2.11.2","eslint":"^0.16.2","faucet":"0.0.1","istanbul":"^0.3.7","tape":"^3.5.0"},"scripts":{"test":"make dist test"},"gitHead":"a7b1108214c2be0a2edfc233ff94d30f160c8984","_id":"postcss-quantity-queries@0.2.0","_shasum":"a437d921a3e73f055746aa64bb5c766e073cc0f4","_from":".","_npmVersion":"2.7.1","_nodeVersion":"0.12.0","_npmUser":{"name":"pascalduez","email":"public@pascalduez.me"},"maintainers":[{"name":"pascalduez","email":"public@pascalduez.me"}],"dist":{"shasum":"a437d921a3e73f055746aa64bb5c766e073cc0f4","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-quantity-queries/-/postcss-quantity-queries-0.2.0.tgz"},"directories":{}},"0.3.0":{"name":"postcss-quantity-queries","version":"0.3.0","description":"PostCSS plugin enabling quantity-queries","keywords":["css","quantity-queries","postcss","postcss-plugins"],"author":{"name":"Pascal Duez","url":"https://github.com/pascalduez"},"homepage":"https://github.com/pascalduez/postcss-quantity-queries","bugs":{"url":"https://github.com/pascalduez/postcss-quantity-queries/issues"},"repository":{"type":"git","url":"git://github.com/pascalduez/postcss-quantity-queries.git"},"license":{"type":"unlicence","url":"http://unlicense.org"},"files":["dist","CHANGELOG.md","index.js","README.md","UNLICENSE"],"dependencies":{"balanced-match":"^0.2.0","postcss":"^4.1.4"},"devDependencies":{"babel":"^5.0.9","babel-eslint":"^2.0.2","coveralls":"^2.11.2","eslint":"^0.18.0","faucet":"0.0.1","istanbul":"^0.3.13","tape":"^4.0.0"},"scripts":{"test":"make"},"gitHead":"b0c303034eb3feafedd7e02f3eb3c9651cfd0463","_id":"postcss-quantity-queries@0.3.0","_shasum":"0dcf19a6e8f90aa4c55f5f3d71c92e52d9074fe5","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"pascalduez","email":"public@pascalduez.me"},"maintainers":[{"name":"pascalduez","email":"public@pascalduez.me"}],"dist":{"shasum":"0dcf19a6e8f90aa4c55f5f3d71c92e52d9074fe5","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-quantity-queries/-/postcss-quantity-queries-0.3.0.tgz"},"directories":{}},"0.3.1":{"name":"postcss-quantity-queries","version":"0.3.1","description":"PostCSS plugin enabling quantity-queries","keywords":["css","quantity-queries","postcss","postcss-plugin"],"author":{"name":"Pascal Duez","url":"https://github.com/pascalduez"},"homepage":"https://github.com/pascalduez/postcss-quantity-queries","bugs":{"url":"https://github.com/pascalduez/postcss-quantity-queries/issues"},"repository":{"type":"git","url":"git://github.com/pascalduez/postcss-quantity-queries.git"},"license":{"type":"unlicence","url":"http://unlicense.org"},"files":["dist","CHANGELOG.md","index.js","README.md","UNLICENSE"],"dependencies":{"balanced-match":"^0.2.0","postcss":"^4.1.6"},"devDependencies":{"babel":"^5.1.13","babel-eslint":"^3.0.1","coveralls":"^2.11.2","eslint":"^0.20.0","faucet":"0.0.1","istanbul":"^0.3.13","tape":"^4.0.0"},"scripts":{"test":"make"},"gitHead":"3b8f4938c65be834bdfd6321606841b2477e74b2","_id":"postcss-quantity-queries@0.3.1","_shasum":"8e3aef1b4bc2ad518aa01e26556190c1d43a6f2f","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"pascalduez","email":"public@pascalduez.me"},"maintainers":[{"name":"pascalduez","email":"public@pascalduez.me"}],"dist":{"shasum":"8e3aef1b4bc2ad518aa01e26556190c1d43a6f2f","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-quantity-queries/-/postcss-quantity-queries-0.3.1.tgz"},"directories":{}},"0.4.0":{"name":"postcss-quantity-queries","version":"0.4.0","description":"PostCSS plugin enabling quantity-queries","keywords":["css","quantity-queries","postcss","postcss-plugin"],"author":{"name":"Pascal Duez","url":"https://github.com/pascalduez"},"homepage":"https://github.com/pascalduez/postcss-quantity-queries","bugs":{"url":"https://github.com/pascalduez/postcss-quantity-queries/issues"},"repository":{"type":"git","url":"git://github.com/pascalduez/postcss-quantity-queries.git"},"license":"Unlicense","files":["dist","CHANGELOG.md","index.js","README.md","UNLICENSE"],"dependencies":{"balanced-match":"^0.2.0","postcss":"^5.0.4"},"devDependencies":{"babel":"^5.8.21","babel-eslint":"^4.1.0","babel-istanbul":"^0.3.18","coveralls":"^2.11.2","eslint":"^1.2.1","faucet":"0.0.1","opn-cli":"^1.0.0","tape":"^4.0.0"},"scripts":{"test":"make"},"gitHead":"bae8fdf656895c9fda607b780d7b7a7a916119c7","_id":"postcss-quantity-queries@0.4.0","_shasum":"be1370a7be9312a173639c0869aa4210244f86ce","_from":".","_npmVersion":"2.14.1","_nodeVersion":"0.12.7","_npmUser":{"name":"pascalduez","email":"public@pascalduez.me"},"dist":{"shasum":"be1370a7be9312a173639c0869aa4210244f86ce","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-quantity-queries/-/postcss-quantity-queries-0.4.0.tgz"},"maintainers":[{"name":"pascalduez","email":"public@pascalduez.me"}],"directories":{}}},"name":"postcss-quantity-queries","time":{"modified":"2016-11-11T17:37:19.806Z","created":"2015-03-09T17:01:40.646Z","0.1.0":"2015-03-09T17:01:40.646Z","0.2.0":"2015-03-12T18:03:33.969Z","0.3.0":"2015-04-07T10:32:01.228Z","0.3.1":"2015-05-02T11:20:29.102Z","0.4.0":"2015-09-04T12:39:50.801Z"},"readmeFilename":"README.md","homepage":"https://github.com/pascalduez/postcss-quantity-queries"}