Hacker News new | past | comments | ask | show | jobs | submit login

BEM — Block Element Modifier is a methodology that helps you to create reusable components and code sharing in front-end development

http://getbem.com/introduction/

In short, you do things like this:

.form { }

.form--theme-xmas { }

.form--simple { }

.form__input { }

.form__submit { }

.form__submit--disabled { }

Where the prefix __ is an Element and -- is a Modifier.

So, in that example you have the form, the form with Christmas modifier and also a form button that is expected to only happen under forms.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: