Skip to content

Repository files navigation

Description

This is a postcss plugin for supportting bem syntax in the process of writing css or pcss.

Usage

Install && use

If� you want to use this tool,the first step is installing it through npm.

npm i @mozheng-neal/postcss-bem --save-dev

After installing it,this plugin can be used in multiple ways, such as webpack, gulp and so on, you could acquire the detail information at how to use postcss

Example

�The supported css bem syntax contains mainly @component, @descendent @modifier @when. A usage example as follows:

html
<div class="container">
<div class="container-child">
</div>
<div class="container--des">
</div>
<div class="container_state">
</div>
</div>css/pcss
@component container {
color: red;
@descendent child {
color: yellow
}
@modifier des {
color: gray;
}
@when state {
color: green;
}
}

About

支持bem语法的postcss插件

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages