it automatically generates semantic class names (i.e...span5)
I donβt think span5 is a semantic name, since it does not describe the content at all, but it describes the layout in a rather specific way.
Of course, the term "semantic" is scattered a lot, but in its purest sense it should have little or nothing to do with the concept.
Reasons not to use names describing the presentation:
- If the layout changes, the wrong name
- The layout can be adapted for another device for which it is incorrect and / or pointless.
- The markup is less important for everyone who reads it (i.e. your team).
- Layouts can become fragile; a change to one class that has been used in many different places and with many different meanings can break in some places in which it is used.
The biggest drawback of generic classes such as "span6" is that they are abused (I saw this with Bootstrap, which has similar mesh classes). "I need this element to span 2 columns ... great! I'll just remove the" span2 "class and do it!"
This does not mean that you should not seek reuse; but reuse can come from class names associated with content (admittedly, it can bring some effort) and with mixins.
I recently started work on a large multi-year client project, and the first phase of interface development creates a library of templates for use through the project.
Most projects end with exceptions / trade-offs for the sake of practicality, but you have the opportunity to start with an approach with best practice.
source share