HTML/CSS Frameworks: Useful, Universal, Usable, Unobtrusive

Published on November 18, 2009 (ā†» July 14, 2023), filed under (RSS feed for allĀ categories).

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.)

Was this useful or interesting? Share (toot) this post, or maybe treat me to a coffee.Ā Thanks!

About Me

Jens Oliver Meiert, on September 30, 2021.

Iā€™m Jens, and Iā€™m an engineering lead and author. Iā€™ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, Iā€™m close to W3C and WHATWG, and I write and review books for Oā€™Reilly and FrontendĀ Dogma.

With my current move to Spain, Iā€™m open to a new remote frontend leadership position. Feel free to review and refer my CV or LinkedInĀ profile.

I love trying things, not only in web development, but also in other areas like philosophy. Here on meiert.com I share some of my views andĀ experiences.

Comments (Closed)

  1. On November 18, 2009, 19:23 CET, Neovov said:

    Thanks for the ending teasingā€¦
    This go.css made me do some regular expression to make it readable (but still uncomprehensible).

    Nice post, but Iā€™m still wondering if a great HTML/CSS framework can exists (depending of the ā€œframeworkā€ definition). Maybe if you have to make a billion pages for an huge customer. But for different customers?

    Through the time I made a kind of HTML/CSS squeletton I use in each project I work on. But I find it still uncompleteā€¦ (Iā€™m sure you can help šŸ˜‰ )

    BTW, isnā€™t there a problem with the Chokeā€™s file weight in your post ? (Choke 1.0 (ZIP, 189,210,670 KB))

  2. On November 18, 2009, 22:08 CET, Vladimir Carrer said:

    Interesting thoughts.
    If I should define CSS Framework in one sentence I will say: CSS Framework is making high level reusable CSS Code

  3. On November 20, 2009, 10:39 CET, Thomas @ DailyThomas.com said:

    Maybe, one day, Iā€™ll start using a html/css framework. For now, I just donā€™t see the benefit of it. Maybe Iā€™m just too conservativeā€¦ I also still use wsftp95 for uploading my filesā€¦ lol !

  4. On November 24, 2009, 14:34 CET, Richard said:

    There will probably never be an ideal HTML/CSS framework but often it is a case of just avoiding reinventing the wheel (even if the wheel we are using is a little wonky and doesnā€™t handle corners well, ha ha).
    Do you have have any recommendations on frameworks that meet or come close to your ideals?

  5. On November 30, 2009, 15:12 CET, Alan Gresley said:

    Just give me some pieces of 4 by 2 (timber), nails and a hammer and all is well. I build up code fragments like this in NoteTab.

    <code &lt;  &gt;
    ^!InsertHtml <CODE>&lt;^&&gt;</CODE>
    
    <li><a href=""
    ^!InsertHtml <LI><A href="">^&</A></LI>
    

    This produces this in the source.

    <code>&lt;&gt;</code>
    
    <li><a href=""></a></li>
    

    You can create some very large code fragments and even optional selection boxes. Take some time to build up though.

    Frameworks look so bloated in comparison.

  6. On December 23, 2009, 18:54 CET, Alan said:

    Meiertā€™s four Uā€™s sounds like a good principle to me, Maybe i should be concentrating on the last one since it looks like google will be leaning more and more on the speed of websites after adding the speed section to the webmaster tools.

  7. On May 10, 2010, 15:13 CEST, Webstandard-Blog said:

    Sounds good Jens, but a lot of those HTML-& CSS-Frameworks includes a lot of code-overhead you donā€™t really needs (mostly). Therefore I reduce it, as much as I can and the web-projetc needs.