In this whirlwind look at more modern approaches to front-end development, you have hopefully picked up a thing or two, as well as realized that, despite their intentions, the things we’ve been doing for years need constant re-evaluation. Our valiant pursuit of clean markup and semantic classes and IDs has served to help no one, and often hindered us. To summarize this all-too-brief chapter
We need to take a more pragmatic and engineering-led approach to code. Code is not art; it is not meant to be pretty. It is a powerful tool that we need to manipulate to create bigger, faster, more robust websites. Borrowing paradigms from developers and engineers can help us no end.
Harry Roberts works as Consultant Front-end Architect. He specializes in authoring and scaling massive frontends. He is the lead and sole developer of inuit.css, a powerful, scalable, Sass-based, BEM, OOCSS framework. Harry writes on the subjects of maintainability, architecture, performance, OOCSS and more at csswizardry.com and tweets.
Inayaili de León is Lead Web Designer at Canonical — the company behind Ubuntu—evangelizing the brands’ visual direction online. She semantic HTML and CSS. She blogs.
Keep your class names relevant but neutral, sensible but portable. Instead of writing class names that describe the content, try to write names that can be applied to any type of content, and that describe the visual treatment that the class will add. Writing classes that describe content is redundant and serves to help no one.
What is useful is knowing a class isn’t tied to a particular type of content, and that it is abstracted enough to be reused elsewhere. Nicole Sullivan’s media object14 is a perfect example of this way of thinking. Class names that don’t allude at all to the type of content are highly reusable.
Read More About: Vega movies