A note from the archives
A couple of months ago, Dee and Chris sat down to talk about some ways in which to style a particular component on a website. It’s super neat to see the two think their way through layout questions and whether or not to use Flexbox depending on the circumstances.
Laying Things Out (HTML & Flexbox) with Dee Gill
What have you learnt this week?
Robin Rendle: I’ve just started work on the largest, most complex CSS codebase that I’ve ever encountered. It’s quite scary. The rules that worked so well in freelance life, the rules that I could depend upon to write CSS, no longer apply here. This is because the team can’t simply get every developer to start writing BEM or using CSS Modules or thinking about immutable CSS.
These tricks don’t take long to master but their implementation can’t be allowed to be half baked. In many instances, using these techniques would actually damage the current state of things, as there would be yet another standard with which we have to adhere to when we write code.
So I’m wondering where to start; how should I organise hundreds of people to think about CSS in the right way? And subsequently, what is “the right way” to think about CSS when I’m only used to “the right way” for a single developer?
I think the solution to this problem, of writing maintainable CSS in a large organization, requires just as much time looking at the codebase as it does speaking to designers and developers about their expectations. After interviews and research I think I’ve boiled it down to this: how much of the current CSS is predictable? When a designer or a developer writes some code, which is the part that they have complete confidence in? And which are the parts that make them nervous, or makes them break out in a sweat?
I think those are the parts to focus on first because removing the whole codebase, and painting all the problems with the same brush, would in fact cause more instability and unpredictability.
And as a designer that’s the worst outcome I can imagine.
Until next time!