HTML/CSS Frameworks: Useful, Universal, Usable, Unobtrusive
Published on NovĀ 18, 2009 (updated JulĀ 14, 2023), filed under development, html, css, frameworks, quality (feed). (Share this on Mastodon orĀ Bluesky?)
This is not necessarily all wrong but somewhat dated. I threw all the experience I could muster into a little book on the matter: Check out The Little Book of HTML/CSS Frameworks (updated) for a fresh look atāframeworks.
A high quality HTML/CSS framework needs to have four attributes: useful, universal, usable, and unobtrusive. The four Uās.
Useful
If an HTML/CSS framework doesnāt do what sites and the people behind the sites need, itās useless. Garbage. Most HTML/CSS frameworks arenāt useful. They solve problems nobody has (for example, an infinite number of columns), or they ignore problems everyone has (for example, core maintenance after n months). For an HTML/CSS framework to be useful it must only address problems more than, say, 90% of all target documents have. That excludes framework customizationāsee Usable.
Universal
A high quality HTML/CSS framework wants to be used by as many documents as possible. And given that it might be, it then doesnāt want to do any harm. That is, it does not play havoc with any on-top layout, and it doesnāt significantly slow things down, eitherāsee Unobtrusive. It is fine to limit the scope of āuniversal,ā for example to a company. Public frameworks donāt limit their scope. All of them fail at being universal. (Stay with me.)
Usable
A usable framework is easy to understand and can be dumped into pretty much any document, all of this without customization. (This doesnāt mean people should do it.) Youāll see enough crazy things happening once the framework is in production. People donāt want to customize, and of those who want, most will do something you donāt expect, and be it to modify their local copy of the framework in creative ways. To make a framework usable, use as few IDs and classes as possible, narrow layout options to the most probable onesāsee Universalā, and generally keep it simple.
Unobtrusive
The best framework cannot even be seen. You barely feel it. Itās like a ghost stroking your hair. It doesnāt slow documents down. It blends into the source code. Itās almost invisible. Alas, you can smell the most popular frameworks from a mile away. Maybe itās because the document is showing in the status bar that itās loading something from a foreign hostname. Maybe itās because the fancy 12 column grid is only offered by framework x. Maybe itās just paranoia. In order to make an HTML/CSS framework unobtrusive, you need to keep things simple once again, and pull out every ābest practiceā card you have.
ā§ Now that we think about it, maybe the universal margin and padding resetāthe one I had to tweet about again for simplicity reasonsāis the only HTML/CSS āframeworkā that ever gets close to these requirements. (Choke certainly does not.)
I at least, the grim web developer, am too much in love with tailored solutions. And so I might share more about this framework I wrote for Google, maybe, the one that I referenced so subtly in July. (And yet this is still a personal post.)
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a web developer, manager, and author. Iāve been working as a technical lead and engineering manager for companies youāve never heard of and companies you use every day, Iām an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for OāReilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)