{"_id":"saladcss-bem","_rev":"322170","name":"saladcss-bem","description":"PostCSS plugin implementing BEM as at-rules","dist-tags":{"latest":"0.0.2"},"maintainers":[{"name":"baiyaaaaa","email":"286030975@qq.com"},{"name":"youngerheart","email":"435495400@qq.com"}],"time":{"modified":"2021-06-04T01:28:08.000Z","created":"2016-05-16T09:02:10.843Z","0.0.2":"2017-05-31T06:47:17.501Z","0.0.1":"2016-05-16T09:02:10.843Z"},"users":{"rubiadias":true},"author":{"name":"Malte-Maurice Dreyer","email":"dreyer.maltem+dev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/saladcss/saladcss-bem.git"},"versions":{"0.0.2":{"name":"saladcss-bem","version":"0.0.2","description":"PostCSS plugin implementing BEM as at-rules","keywords":["postcss","css","postcss-plugin","bem"],"author":{"name":"Malte-Maurice Dreyer","email":"dreyer.maltem+dev@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/saladcss/saladcss-bem.git"},"dependencies":{"postcss":"^6.0.1"},"devDependencies":{"gulp-eslint":"^0.12.0","gulp-mocha":"^2.0.1","chai":"^2.3.0","gulp":"^3.8.11"},"scripts":{"test":"gulp"},"gitHead":"f6e2f5de5f2d304ddc1bdba0871b218d932f96a0","bugs":{"url":"https://github.com/saladcss/saladcss-bem/issues"},"homepage":"https://github.com/saladcss/saladcss-bem#readme","_id":"saladcss-bem@0.0.2","_shasum":"1a50774ca9412c4a5a075ad8604cc5bbce3f4dc2","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.8.1","_npmUser":{"name":"baiyaaaaa","email":"286030975@qq.com"},"dist":{"shasum":"1a50774ca9412c4a5a075ad8604cc5bbce3f4dc2","size":4334,"noattachment":false,"key":"/saladcss-bem/-/saladcss-bem-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/saladcss-bem/download/saladcss-bem-0.0.2.tgz"},"maintainers":[{"name":"baiyaaaaa","email":"286030975@qq.com"},{"name":"youngerheart","email":"435495400@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/saladcss-bem-0.0.2.tgz_1496213237306_0.21687723975628614"},"directories":{},"publish_time":1496213237501,"_hasShrinkwrap":false,"_cnpm_publish_time":1496213237501},"0.0.1":{"name":"saladcss-bem","version":"0.0.1","description":"PostCSS plugin implementing BEM as at-rules","keywords":["postcss","css","postcss-plugin","bem"],"author":{"name":"Malte-Maurice Dreyer","email":"dreyer.maltem+dev@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/saladcss/saladcss-bem.git"},"dependencies":{"postcss":"^5.0.8"},"devDependencies":{"gulp-eslint":"^0.12.0","gulp-mocha":"^2.0.1","chai":"^2.3.0","gulp":"^3.8.11"},"scripts":{"test":"gulp"},"gitHead":"361c379a2365940ad4215732804041a61da61a0e","bugs":{"url":"https://github.com/saladcss/saladcss-bem/issues"},"homepage":"https://github.com/saladcss/saladcss-bem#readme","_id":"saladcss-bem@0.0.1","_shasum":"72070014ff3f6a49a6872cfcb3946c7758f40fc2","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"youngerheart","email":"435495400@qq.com"},"dist":{"shasum":"72070014ff3f6a49a6872cfcb3946c7758f40fc2","size":4330,"noattachment":false,"key":"/saladcss-bem/-/saladcss-bem-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/saladcss-bem/download/saladcss-bem-0.0.1.tgz"},"maintainers":[{"name":"baiyaaaaa","email":"286030975@qq.com"},{"name":"youngerheart","email":"435495400@qq.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/saladcss-bem-0.0.1.tgz_1463389326007_0.930267974268645"},"directories":{},"publish_time":1463389330843,"_cnpm_publish_time":1463389330843,"_hasShrinkwrap":false}},"readme":"# PostCSS Bem [![Build Status][ci-img]][ci]\n\n[PostCSS] plugin implementing BEM as at-rules.\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]:  https://travis-ci.org/ileri/postcss-bem.svg\n[ci]:      https://travis-ci.org/ileri/postcss-bem\n\n```css\n@utility utilityName {\n    color: green;\n}\n\n@utility utilityName small {\n    color: blue;\n}\n\n@component ComponentName {\n    color: cyan;\n\n    @modifier modifierName {\n        color: yellow;\n    }\n\n    @descendent descendentName {\n        color: navy;\n    }\n\n    @when stateName {\n        color: crimson;\n    }\n}\n\n@component-namespace nmsp {\n    @component ComponentName {\n        color: red;\n    }\n}\n```\n\n```css\n.u-utilityName {\n    color: green;\n}\n\n.u-sm-utilityName {\n    color: blue;\n}\n\n.ComponentName {\n    color: cyan;\n}\n\n.ComponentName--modifierName {\n    color: yellow;\n}\n\n.ComponentName-descendentName {\n    color: navy;\n}\n\n.ComponentName.is-stateName {\n    color: crimson;\n}\n\n.nmsp-ComponentName {\n    color: red;\n}\n```\n\n**With shortcuts**\n```css\n@b nav { /* b is for block */\n    @e item { /* e is for element */\n        display: inline-block;\n    }\n    @m placement_header {\n        background-color: red;\n    }\n}\n```\n\n```css\n.nav {}\n.nav__item {\n    display: inline-block\n}\n.nav_placement_header {\n    background-color: red\n}\n```\n\n## Usage\n\n```js\npostcss([ require('postcss-bem')({\n    defaultNamespace: undefined, // default namespace to use, none by default\n    style: 'suit', // suit or bem, suit by default,\n    separators: {\n        descendent: '__' // overwrite any default separator for chosen style\n    },\n    shortcuts: {\n        utility: 'util' //override at-rule name\n    }\n}) ])\n```\n\nSee [PostCSS] docs for examples for your environment.\n","_attachments":{},"homepage":"https://github.com/saladcss/saladcss-bem#readme","bugs":{"url":"https://github.com/saladcss/saladcss-bem/issues"},"license":"MIT"}