day 250 — code 365

Sat 20 Aug 2016

BEM

Decided that instead of this:

.my-input__productdetails--name

This was more semantic:

.my-input--productdetails-name

What distracted me to initially choose the first option was how the class was generated in SASS!

This seemed to make sense:

.my-input {
&__productdetails {
&--name {
// style
}
}
}

However, this is JUST as correct!

.my-input {
&--product {
&-name {
// style
}
}
}

There is no problem with using &- (single dash), as SASS is just a compiling tool!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.