Table of Contents
Praise for CSS Secrets
This is a new generation of CSS books, for a new generation of CSS. No longer a simple language tied to complicated browser hacks and workarounds, CSS is now a richly powerful and deeply complex ecosystem of over 80 W3C specifications. Nobody is better at making sense of this new CSS, and of providing design principles that help you solve problems with it, than Lea Verouamong the handful of truly amazing coders Ive known.
Jeffrey Zeldman
author, Designing with Web Standards
Lea Verous encyclopaedic mind is one of a kind, but thanks to this generous book, you too can get an insight into what its like to wield CSS to do just about anything you can think of. Even if you think you know CSS inside-out, I guarantee that there are still secrets in this book waiting to be revealed.
Jeremy Keith
Shepherd of Unknown Futures, Clearleft
If you want the inside scoop on fascinating CSS techniques, smart best practices, and some flat-out brilliance, dont hesitateread this book. I loved it!
Eric A. Meyer
Lea is an exceedingly clever coder. This book is absolutely packed with clever and useful ideas, even for people who know CSS well. Even better, youll feel more clever in your work as this book encourages pushing beyond the obvious.
Chris Coyier
CodePen
CSS Secrets is an instant classicso many wonderful tips and tricks you can use right away to enhance your UX designs!
Christopher Schmitt
author of CSS Cookbook
There arent many books that provide as many practical techniques as Lea Verous CSS Secrets. Filled with dozens of solutions to common design problems, the book is a truly valuable collection of smart tips and tricks for getting things done well, and fast. Worth reading, even if you think that you know the ins and outs of CSS!
Vitaly Friedman
cofounder and editor-in-chief of Smashing Magazine
Without fail, whenever I read something written by Lea Verou, I manage to learn something new. CSS Secrets is no different. The book is broken down into easy-to-digest chunks filled with lots of juicy bits of knowledge. While some of the book is very forward looking, there is plenty that Ive been able to take away and apply to my own projects right away.
Jonathan Snook
web designer and developer
Leas book is fantastic. She bends and contorts CSS to do things Im pretty sure even the spec authors never imagined! You will learn multiple ways of accomplishing each graphic effect by trying out the techniques she walks through in each chapter. Later, in your work, youll find yourself saying, hmm, that thing Lea did will work perfectly here! Before you know it, your site is almost image free because your graphics are all in easy to maintain CSS components. Whats more, her techniques are fun, walking the line between practical and improbable!
Nicole Sullivan
Principal Software Engineer, creator of OOCSS
Lea Verous CSS Secrets is useful not so much as a collection of CSS tips, but as a textbook on how to solve problems with CSS. Her in-depth explanation of the thought process behind each secret will teach you how to create your own solutions to CSS problems. And dont miss the Introduction, which contains some must-read CSS best practices.
Elika J. Etemad (aka fantasai)
W3C CSS Working Group Invited Expert
Leas presentations have long been must-see events at web development conferences around the world. A distillation of her years of experience, CSS Secrets provides elegant solutions for thorny web design issues, while alsoand more importantlyshowing how to solve problems in CSS. Its an absolute must-read for every frontend designer and developer.
Dudley Storey
designer, developer, writer, web education specialist
I thought I had a pretty advanced understanding of CSS, then I read Lea Verous book. If you want to take your CSS knowledge to the next level, this is a must-own.
Ryan Seddon
Team Lead, Zendesk
CSS Secrets is by far the most technical book that I have ever read on the topic. Lea has managed to push the boundaries of a language as simple as CSS so far that you will not be able to distinguish this from magic. Definitely not a beginners read; its heavily recommended to anyone thinking they know CSS all too well.
Hugo Giraudel
frontend developer, Edenspiekermann
I often think that CSS can seem a bit like magic: a few rules can transform your web pages from blah to beautiful. In CSS Secrets, Lea takes the magic to a whole new level. She is a master magician of CSS, and we get to explore that magical world along with her. I cant count how many times I said out loud while reading this book, Thats so cool! The only trouble with CSS Secrets is that after reading it, I want to stop everything else Im doing and play with CSS all day.
Elisabeth Robson
cofounder of WickedlySmart.com and coauthor of Head First JavaScript Programming
CSS Secrets is a book that all web developers should have in their library. Using the information it contains youll learn numerous hints and tips to make CSS perform tasks you never thought possible. I was astonished at how often the author came up with simple and elegant lateral thinking solutions to problems that had bugged me for years.
Robin Nixon
web developer, online instructor, and author of several books on CSS
As a master designer and programmer, Lea Verous book is as beautiful and as well thought out as her code. Whether youre fairly new to CSS, or well versed in the intricacies of CSS3, this book has something for everyone.
Estelle Weyl
Open Web Evangelist and coauthor of CSS: The Definitive Guide
CSS SECRETS
BETTER SOLUTIONS TO EVERYDAY WEB DESIGN PROBLEMS
LEA VEROU
Beijing Boston Farnham Sebastopol Tokyo
CSS Secrets
by Lea Verou
Copyright 2015 Lea Verou. All rights reserved.
Printed in Canada.
Published by OReilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.
Editors: Mary Treseler and Meg Foley
Production Editor: Kara Ebrahim
Copyeditor: Jasmine Kwityn
Indexer: WordCo Indexing Services
Proofreader: Charles Roumeliotis
Interior Designer: Lea Verou
Cover Designer: Monica Kamsvaag
Illustrator: Lea Verou
See http://www.oreilly.com/catalog/errata.csp?isbn=0636920031123 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. The cover image and related trade dress are trademarks of OReilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.