Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NealST/postcss-bem

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.