Interview with Jonathan Snook: CSS architecture – challenges and trends
As a diamond sponsor of the Frontend Conference Zurich on 27 and 28 August, we had the exclusive opportunity to conduct interviews with selected speakers. You shared your experiences and opinions about the exciting interplay between design and technology. Thank you for the inspirational food for thought!
You started talking about CSS architecture before it was cool. Have we made a lot of progress with regards to how we structure our CSS since SMACSS was published almost four years ago?
Are you happy with what the language provides us with or do you think it should take care of some issues (scoping, e.g.)?
I work with what I have. CSS at its core is as simple and as complex as it needs to be. It essentially says, given a particular HTML element, this is what it should look like under a specific condition. We’ll have more ways of defining what it should look like and more ways of specifying conditions but I don’t see the language itself needing to change.
What is the most important challenge we currently face when writing CSS?
Legacy CSS is a huge challenge for many organizations. Trying to transition a codebase from one approach to another is incredibly complicated. Things often need to get worse before they can get better.
Web Components, or rather Shadow DOM, are suggested to be the future of CSS. Where do you see their role?
I don’t think they’re necessarily the whole future but they will be another useful tool for building sites. In building complex and robust applications, it’s useful to be able to bundle up an object in a way that makes it easy to update and easy to replicate. That’s what Web Components give us.
Which ongoing CSS spec are you most excited about?
CSS Grid Layout could be the next big thing when it comes to … well, layout. Flexbox is the current darling as people learn all the possibilities and Grid Layout will give us even more control over how we design and build web sites and applications.