Ask DN: Question for BEM enthisiests
almost 5 years ago from Matt Sisto, Lead UX Designer @ Upserve
When you are defining a class, are you including every parent element?
For example: You have a container .content
with a child .content__metadata
and .content__metadata
has a child ".timestamp".
Given that the selector will be namespaced to the block and there will only be one .timestamp
in this block, would you give the .timestamp
class a name of .content__metadata__timestamp
or .content__timestamp
?
Login to Comment
You'll need to log in before you can leave a comment.
LoginRegister Today
New accounts can leave comments immediately, and gain full permissions after one week.
Register now