https://github.com/jkiimm/postcss-at-rules-bem
PostCSS plugin for BEM name convention
https://github.com/jkiimm/postcss-at-rules-bem
bem css postcss postcss-plugin
Last synced: 2 months ago
JSON representation
PostCSS plugin for BEM name convention
- Host: GitHub
- URL: https://github.com/jkiimm/postcss-at-rules-bem
- Owner: jkiimm
- License: mit
- Created: 2018-04-06T07:20:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-06T09:31:41.000Z (about 8 years ago)
- Last Synced: 2025-09-13T05:34:01.328Z (10 months ago)
- Topics: bem, css, postcss, postcss-plugin
- Language: JavaScript
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS At Rules Bem [![Build Status][ci-img]][ci]
[PostCSS] plugin for BEM name convention.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/jkiimm/postcss-at-rules-bem.svg
[ci]: https://travis-ci.org/jkiimm/postcss-at-rules-bem
```css
/* Input example */
@block foo {
width: 1px;
@mod bar {
width: 2px;
}
@el baz {
width: 3px;
@mod qux {
width: 4px;
}
}
}
```
```css
/* Output example */
.foo {
width: 1px;
}
.foo_bar {
width: 2px;
}
.foo__baz {
width: 3px;
}
.foo__baz_qux {
width: 4px;
}
```
## Usage
```js
postcss([ require('postcss-at-rules-bem') ])
```
See [PostCSS] docs for examples for your environment.