Brilliant approach to CSS

CSS Inheritance, The Cascade And Global Scope: Your New Old Worst Best Friends

I’m big on modular design. I’ve long been sold on dividing websites into components, not pages, and amalgamating those components dynamically into interfaces. Flexibility, efficiency and maintainability abound.

But I don’t want my design to look like it’s made out of unrelated things. I’m making an interface, not a surrealist photomontage.

As luck would have it, there is already a technology, called CSS, which is designed specifically to solve this problem. Using CSS, I can propagate styles that cross the borders of my HTML components, ensuring a consistent design with minimal effort. This is largely thanks to two key CSS features:

inheritance, the cascade (the “C” in CSS).


Reading CSS at BBC Sport (Part 1) lead me to this presentation by Harry Roberts and then to CSSWizardry on GitHub.

Roberts also has created some basic components including the “nav” abstraction and, of course, Nicole Sullivan started all of this with back in 2010 with the media object

The BBC Sport article also talks about BEM which I’ve never really embraced but this might help me along.

Update: 06/21/16 Also found this book titled “Scalable and Modular Architecture for CSS” which serves as a good intro with some examples.


Really interesting piece by Adam Morse: CSS and Scalability

I also started to think about communication and how it moves in multiple directions. If I’m reading html, I want to know what the css is going to do. If I’m reading css I want to know what will happen if I apply it to a block of html. In a great system there is a two way street of information. If you look at the CSS, you can tell what will happen. If you look at the html, you know what the code will do.

Along with some great tools

And also an older one from August 2014: Good CSS

On kinda the same topic by Jonathan Snook: Scalable and Modular Architecture for CSS

and in the same vein but about HTML Semantics by Nicolas Gallagher from March 2012.

Speaking of Semantics here is a tool – Outline Audit – a small JavaScript program that analyses the document outline of the current page, and emits warnings in the developer console when something looks odd.

Organizing your CSS file: