Skip to content

Instantly share code, notes, and snippets.

View AlfieDarko's full-sized avatar

Alfie Darko AlfieDarko

View GitHub Profile
/* Super simplified html form to illustrate BEM classname usage. */
<form class="checkout-form checkout-form--darkmode">
<p class="checkout-form__title">
Buy Bitcoins!
</p>
<input class="checkout-form__input checkout-form__input--big"/>
/* Block component */
.checkout-form {
// ..
}
/* Element that depends upon the block */
.checkout-form__title {
// ..
}
.checkout-form__input {
// ..
/* Block component */
.checkout-form {
/* Elements */
&__title {
// ...
}
&__button {
// ...
}
&__input {