Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

toruta39/bemixin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bemixin

Minimal helper mixins for BEM user

Install

npm install bemixin --save-dev

Usage

Webpack with sass-loader

@import "~bemixin";

@include b(cat) {
  margin: 0 auto;
  width: 50%;
  background-color: white;

  @include e(eye) {
    background-color: blue;

    @include m(left) {
      background-color: gold;
    }
  }

  @include m(fatty) {
    width: 100%;

    @include b(cat) {
      @include e(eye) {
        background-color: gold;
      }
    }
  }
}

Output

.cat {
  margin: 0 auto;
  width: 50%;
  background-color: white; }

  .cat__eye {
    background-color: blue; }

    .cat__eye--left {
      background-color: gold; }

  .cat--fatty {
    width: 100%; }

    .cat--fatty .cat__eye {
      background-color: gold; }

About

Helper mixins for BEM user

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages