Published 2013 by Smashing Magazine GmbH, Freiburg, Germany.
Printed in the EU.
ISBN: 978-3-94454058-0 (ePUB)
Cover Design and Illustrations created by Anna Shuvalova.
Proofreading: Owen Gregory, Iris Ljenjanin.
Editing and Quality Control: Vitaly Friedman.
eBook Production: Cosima Mielke.
Layout: Markus Seyfferth.
Tools: Elja Friedman.
Syntax Highlighting: Prism by Lea Verou.
The reviewers are: Sindre Sorhus, Addy Osmani, Brian Arnold, Sean Coates, Sergey Chikuyonok, Ben Dowling, Inayaili de Leon, Jonathan Snook, Andy Davies, Nicholas C. Zakas, Dan Ariely, Tim Brown, Kristen Bermann, Kalpita Kothary and Joshua Allen.
Idea and Concept: Vitaly Friedman, Sven Lennartz.
All links featured in this book can be found at smashed.by/links .
Smashing Book #4. Crafted by the Smashing Magazines team and well-respected members of the design community with care and love. http://smashed.by/sb4
Preface
By Vitaly Friedman
The beauty of the Web lies in its longevity and flexibility. Time never stands still in Web development, and the more time you spend on the Web, the more frantic the pace seems to become. Some of you might have started developing websites a while back, others have jumped into Web design just recently; but all of you have probably seen techniques and practices coming and going, tools and libraries praised and neglected, trends appearing and falling over the cliff.
The Web is dynamic and versatilecoding techniques arent black or white, and our decisions always emerge from those shady gray areas. There are no perfect solutions, and usually its a matter of reaching a sound compromise within given constraints. Web design today requires pragmatic, open-minded approaches.
This book will not change everything you know about Web design and development. Neither will it revolutionize your workflow or your tools. But hopefully it will challenge you to think a bit differently about how you approach design problems and how to meaningfully solve them in real life.
Smashing Book #4 is a practical book for professional designers and Web developers. It doesnt discuss flat design or skeuomorphism, and it isnt concerned with visual styles or trends.
With New Perspectives on Web Design, we want to explore handy techniques and smart strategies derived from actual projects. Covering both technical and design aspects of Web design, this book provides insights into scalable front-end architecture, obscure back-end tricks, responsible responsive Web design and performance optimization, but also adaptive interfaces, Web typography, content strategy, customer support, the creative process, and the psychology of human behavior on the Web.
We cant foresee what is coming up next. But we can look closely at the state of the art today, and keep improving our workflow with small, gradual enhancementslearning from our colleagues and from our own experiences. And this is exactly why this book existsto keep up with, enrich and improve the wonderful, flexible, unpredictable Web that has become an integral part of our lives over all these years.
Modern CSS Architecture and Front-End Development
By Harry Roberts
In this chapter we are going to take a whirlwind tour of a new approach to building more powerful front-ends for the Web today. After the somewhat erratic introduction (theres a lot to cover, and so little time!), well look at the nitty-gritty of structuring CSS for modern, powerful websites. Our journey starts, somewhat unexpectedly, in England, in the 1700s
The Luddites
The Industrial Revolution, which occurred loosely between the mid-1700s to mid-1800s, signalled a major shift in the worlds commercial manufacturing techniques; traditional hand-working and craftsmanship made way for newer processes involving machines and automation. In early 19th-century England, increasing mechanization gave rise to a group known as the Luddites, a formation of artisanal textile workerscraftsmen and skilled labourerswhose jobs were slowly but surely being made obsolete by the new . The Luddites were an unfortunate, though, in hindsight, probably not unexpected byproduct of the Industrial Revolution.
The machines being introduced could do the work of ten skilled workers, and at ten times the pace. Their slow, handcrafted work was being replaced with the desire for more powerful and profitable means of production. This shift, naturally, didnt sit so well with the workers, who increasingly found themselves ousted from roles they had held for decades. The Luddites are a shining example of people resisting change, and paying dearly for it. Change is good, change is difficult, change is necessary, and change will happenits how we deal with it that counts.
The Web is changing. Are you keeping up?
The Web Then
There was a time (not so long ago, really) when websites were built using tables for structure, and markup like Foo
was used to apply purely visual features. These techniques stayed around for quite a long time.
I started to get into Web development quite recently, around 2007 or so. I was incredibly lucky that the days of tables for layout were long gone, and I strode straight into an arena where technologies like CSS were considered the standard. Each article I read spoke of semantics, clean HTML, and using as few IDs and classes as possible.
CSS made its entrance years before my interest in building websites. Tables were phased out and replaced with a far more powerful and suitable language. For many this was a huge change from what they were used to; for me it was just how things were done when I arrived on the scene. The transition from table-based to CSS-based layouts seemed, on the whole, a welcome change. It took a while for some developers to make the move because, as is always the case with front-end development, people were largely at the mercy of the browsers their audiences were using.
I remember one tale from an older developer, who built a site in a mixture of tables and CSS in the hope of making the transition more gradual.
Despite how long the transition did (or didnt) take, people by and large seemed to love CSS. This was a huge change in development and production workflows that almost everyonecertainly everyone I know personallywelcomed with open arms. CSS could let us do so much more than we were used to: we could build things faster, smarter, bigger and better. We embraced the change and things were better for it.