Most CSS methodologies have the concept of reusable modules - BEM calls them blocks whereas SMACSS and OOCSS calls them modules. All of them recommend creating the modules with a class, e.g.
.room {}
Now if I have two or more instances of rooms in my HTML markup, how do I distinguish between them? I have been doing something like this:
<div class="room room1"></div>
<div class="room room2"></div>
But I am not finding the concept of module identity in any of the methodologies. I only see the concept of module modifiers or sub-classing, i.e. creating modules with extended look and/or behavior, e.g. room-kitchen
. But that's not what I am doing here - all I am doing is creating two instance of the same module and using the identities to say place them at different locations. I don't see any of the methodologies talking about module instances and how to name them. Am I missing something?