Blog
Keeping CSS files in order
The bliss of starting a new website with a blank CSS file. All that white space - natural order. Even with a few styles it’s still easy to find your way. But it never stays like that.
A few hours in and it’s a tangled mess. Over the years I tried to keep some control. Global styles first, then colours, headings, links, the rest. Kind of worked.
Then came media queries. First they went at the end - in order of appearance. Then in a different file. Then I got lost when revisiting a design.
At the moment I like them mixed in with the styles they override or enhance. No idea where I’ll put them in six months time.