Introduction of BEM
What is BEM ?
BEM stand for Block Element Modifier
, Block__Element--Modifier
. It is a methodology that helps you to create reusable components and code sharing in front-end development .
It is developed by the team at Yandex .
- ex:
|
- ex:
|
- ex
.block__element--modifier
this is proper pattern of bem .
|
why use BEM
- Itβs easy for new team members to read the markup and CSS, and understand its behavior
- Adding more developers increases team productivity
- Consistent naming reduces the possibility of class name collisions and side effects
- CSS is independent of markup
- CSS is highly reusable
BEM Practise :
- http://getbem.com/introduction/
- https://en.bem.info/
- https://css-tricks.com/bem-101/
- https://www.sitepoint.com/css-architecture-block-element-modifier-bem/
- https://en.bem.info/platform/libs/bem-components/6.0.0/
- http://getbem.com/naming/
component
- https://github.com/bem/bem-components
Powered by:
@code4mk