{"_id":"postcss-bem","_rev":"321934","name":"postcss-bem","description":"PostCSS plugin implementing BEM as at-rules","dist-tags":{"latest":"0.4.1"},"maintainers":[{"name":"liuchuzhang","email":"liuchuzhang1@gmail.com"}],"time":{"modified":"2021-06-04T01:27:45.000Z","created":"2021-04-10T04:49:54.920Z","0.4.1":"2021-04-10T04:49:54.920Z"},"users":{"joe223":true,"wuwenbin":true,"griname":true,"danielbayley":true},"author":{"name":"Malte-Maurice Dreyer","email":"dreyer.maltem+dev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ileri/postcss-bem.git"},"versions":{"0.4.1":{"author":{"name":"Malte-Maurice Dreyer","email":"dreyer.maltem+dev@gmail.com"},"bugs":{"url":"https://github.com/ileri/postcss-bem/issues"},"dependencies":{"postcss":"^5.0.8"},"description":"PostCSS plugin implementing BEM as at-rules","devDependencies":{"chai":"^2.3.0","gulp":"^3.8.11","gulp-eslint":"^0.12.0","gulp-mocha":"^2.0.1"},"homepage":"https://github.com/ileri/postcss-bem#readme","keywords":["postcss","css","postcss-plugin","bem"],"license":"MIT","name":"postcss-bem","repository":{"type":"git","url":"git+https://github.com/ileri/postcss-bem.git"},"scripts":{"test":"gulp"},"version":"0.4.1","_id":"postcss-bem@0.4.1","_nodeVersion":"12.14.0","_npmVersion":"6.14.11","dist":{"shasum":"83636b73de9d73ffb50c2249f1015537f3f91602","size":4123,"noattachment":false,"key":"/postcss-bem/-/postcss-bem-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-bem/download/postcss-bem-0.4.1.tgz"},"_npmUser":{"name":"liuchuzhang","email":"liuchuzhang1@gmail.com"},"directories":{},"maintainers":[{"name":"liuchuzhang","email":"liuchuzhang1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-bem_0.4.1_1618030194795_0.6760860209835178"},"_hasShrinkwrap":false,"publish_time":1618030194920,"_cnpm_publish_time":1618030194920}},"readme":"# PostCSS Bem [![Build Status][ci-img]][ci]\r\n\r\n[PostCSS] plugin implementing BEM as at-rules.\r\n\r\n[PostCSS]: https://github.com/postcss/postcss\r\n[ci-img]:  https://travis-ci.org/ileri/postcss-bem.svg\r\n[ci]:      https://travis-ci.org/ileri/postcss-bem\r\n\r\n```css\r\n@utility utilityName {\r\n    color: green;\r\n}\r\n\r\n@utility utilityName small {\r\n    color: blue;\r\n}\r\n\r\n@component ComponentName {\r\n    color: cyan;\r\n\r\n    @modifier modifierName {\r\n        color: yellow;\r\n    }\r\n\r\n    @descendent descendentName {\r\n        color: navy;\r\n    }\r\n\r\n    @when stateName {\r\n        color: crimson;\r\n    }\r\n}\r\n\r\n@component-namespace nmsp {\r\n    @component ComponentName {\r\n        color: red;\r\n    }\r\n}\r\n```\r\n\r\n```css\r\n.u-utilityName {\r\n    color: green;\r\n}\r\n\r\n.u-sm-utilityName {\r\n    color: blue;\r\n}\r\n\r\n.ComponentName {\r\n    color: cyan;\r\n}\r\n\r\n.ComponentName--modifierName {\r\n    color: yellow;\r\n}\r\n\r\n.ComponentName-descendentName {\r\n    color: navy;\r\n}\r\n\r\n.ComponentName.is-stateName {\r\n    color: crimson;\r\n}\r\n\r\n.nmsp-ComponentName {\r\n    color: red;\r\n}\r\n```\r\n\r\n**With shortcuts**\r\n```css\r\n@b nav { /* b is for block */\r\n    @e item { /* e is for element */\r\n        display: inline-block;\r\n    }\r\n    @m placement_header {\r\n        background-color: red;\r\n    }\r\n}\r\n```\r\n\r\n```css\r\n.nav {}\r\n.nav__item {\r\n    display: inline-block\r\n}\r\n.nav_placement_header {\r\n    background-color: red\r\n}\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\npostcss([ require('postcss-bem')({\r\n    defaultNamespace: undefined, // default namespace to use, none by default\r\n    style: 'suit', // suit or bem, suit by default,\r\n    separators: {\r\n        descendent: '__' // overwrite any default separator for chosen style\r\n    },\r\n    shortcuts: {\r\n        utility: 'util' //override at-rule name\r\n    }\r\n}) ])\r\n```\r\n\r\nSee [PostCSS] docs for examples for your environment.\r\n","_attachments":{},"homepage":"https://github.com/ileri/postcss-bem#readme","bugs":{"url":"https://github.com/ileri/postcss-bem/issues"},"license":"MIT"}