{"name":"jss-nested","description":"JSS plugin that enables support for nested selectors","version":"1.0.0","author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/jsstyles/jss-nested.git"},"keywords":["jss","plugin","nested","nesting"],"engines":{},"scripts":{"all":"npm run lint && npm run build","test":"opener ./test/index.html","build":"npm run clean && npm run build:lib && npm run build:max && npm run build:min","clean":"rimraf ./lib/*","build:lib":"babel src --out-dir lib","build:max":"NODE_ENV=development webpack src/index.js dist/jss-nested.js","build:min":"NODE_ENV=production webpack src/index.js dist/jss-nested.min.js","lint":"eslint ./src","prepublish":"npm run all && git push --tags"},"license":"MIT","main":"./lib/index.js","devDependencies":{"babel":"^5.6.14","babel-core":"^5.6.20","babel-eslint":"^3.1.23","babel-loader":"^5.3.1","eslint":"^0.24.1","eslint-config-airbnb":"^0.0.6","eslint-config-jss":"^0.1.0","eslint-plugin-react":"^2.7.0","jss":">=3.0.0 < 4.0.0","opener":"^1.4.1","qunitjs":"1.15.0","rimraf":"^2.4.3","webpack":"^1.11.0"},"peerDependencies":{"jss":"^>=3.0.0 < 4.0.0"},"gitHead":"90d1dd5322ad052b110c8387e70018825a4f4c4d","bugs":{"url":"https://github.com/jsstyles/jss-nested/issues"},"homepage":"https://github.com/jsstyles/jss-nested#readme","_id":"jss-nested@1.0.0","_shasum":"a2fd060edcdd60368555c2a52082e501074cfc0b","_from":".","_npmVersion":"2.13.0","_nodeVersion":"2.4.0","_npmUser":{"name":"kof","email":"oleg008@gmail.com"},"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"dist":{"shasum":"a2fd060edcdd60368555c2a52082e501074cfc0b","tarball":"http://registry-npm.ywwl.com/jss-nested/download/jss-nested-1.0.0.tgz","integrity":"sha512-gA6wWk2KQmxgPHtNiH00kwkVEGxwDVP3yHPNapRHRmzZF97QGfFDd1xz42MlDGhaiHwgeoBIAeVlypyPqX+I+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfapcF7IGYibhvhevSVL8tC8I9b+c7Ge9fbWyK2rr6YAiEAk9NK6t/FJtRqvItdPNZAfgRsthI34xS3gWWCgyXs9VQ="}],"size":4243,"noattachment":false,"key":"/jss-nested/-/jss-nested-1.0.0.tgz"},"directories":{},"readme":"# JSS plugin enables support for nested rules\n\n[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/cssinjs/lobby)\n\nMake sure you read [how to use\nplugins](https://github.com/cssinjs/jss/blob/master/docs/setup.md#setup-with-plugins)\nin general.\n\n\n## Use `&` to reference selector of the parent rule.\n\n```javascript\nconst styles = {\n  container: {\n    padding: 20,\n    '&:hover': {\n      background: 'blue'\n    },\n    // Add a global .clear class to the container.\n    '&.clear': {\n      clear: 'both'\n    },\n    // Reference a global .button scoped to the container.\n    '& .button': {\n      background: 'red'\n    },\n    // Use multiple container refs in one selector\n    '&.selected, &.active': {\n      border: '1px solid red'\n    }\n  }\n}\n```\n\nCompiles to:\n\n```css\n.container-3775999496 {\n  padding: 20px;\n}\n.container-3775999496:hover {\n  background: blue;\n}\n.container-3775999496.clear {\n  clear: both;\n}\n.container-3775999496 .button {\n  background: red;\n}\n.container-3775999496.selected, .container-3775999496.active {\n  border: 1px solid red;\n}\n```\n\n## Use `$ruleName` to reference a local rule within the same style sheet.\n\n```javascript\nconst styles = {\n  container: {\n    // Reference the local rule \"button\".\n    '& $button': {\n      padding: '10px'\n    },\n    // Multiple local refs in one rule.\n    '&:hover $button, &:active $button': {\n      color: 'red',\n    },\n    '&:focus $button': {\n      color: 'blue'\n    }\n  },\n  button: {\n    color: 'grey'\n  }\n}\n```\n\nCompiles to:\n\n```css\n.button-3940538223 {\n  color: grey;\n}\n.container-2645419599 .button-3940538223 {\n  padding: 10px;\n}\n.container-2645419599:hover .button-3940538223, .container-2645419599:active .button-3940538223 {\n  color: red;\n}\n.container-2645419599:focus .button-3940538223 {\n  color: blue;\n}\n```\n\n## Use at-rules inside of regular rules.\n\n```javascript\nconst styles = {\n  button: {\n    color: 'red',\n    '@media (min-width: 1024px)': {\n      width: 200\n    }\n  }\n}\n```\n\nCompiles to:\n\n```css\n.button-2683044438 {\n  color: red;\n}\n@media (min-width: 1024px) {\n  .button-2683044438 {\n    width: 200px;\n  }\n}\n```\n\n## Deep nesting\n\n```javascript\nconst styles = {\n  button: {\n    '&$warn': {\n      color: 'red',\n      '&:hover, &:focus': {\n        color: 'white',\n        background: 'red'\n      }\n    }\n  },\n  warn: {}\n}\n```\n\nCompiles to:\n\n```css\n.button-274964227.warn-2315792072 {\n  color: red;\n}\n.button-274964227.warn-2315792072:hover, .button-274964227.warn-2315792072:focus {\n  color: white;\n  background: red;\n}\n```\n\n## Demo\n\n[Simple](http://cssinjs.github.io/examples/plugins/jss-nested/simple/index.html)\n\n## Issues\n\nFile a bug against [cssinjs/jss prefixed with \\[jss-nested\\]](https://github.com/cssinjs/jss/issues/new?title=[jss-nested]%20).\n\n## Run tests\n\n```bash\nnpm i\nnpm run test\n```\n\n## License\n\nMIT\n","publish_time":1445454189088,"_cnpm_publish_time":1445454189088,"dist-tags":{"latest":"6.0.1"}}