I enjoy writing CSS here at kc web design kent but sometimes in the thick of development my nice neat CSS documents can become a bit, well…messy. Most of the time I’m working alone on web design projects at kc web design kent so I always think it won’t matter too much. But then I go and open a CSS style sheet from and old web design project to make some changes and I always have to edit the “messy” bit I left in. Still, I only have myself to blame.
The other day I came across this fantastic article on github about how to write, layout, structure and use proper selectors in your CSS documents. There are quite a few of these types of articles knocking around but for some reason this one seems to strike a cord with my style of writing and thinking about CSS in web design. This article is well worth a read and a bookmark and I can see myself coming back to this again and again.
From the simple contents structure to how to indent and layout your document in a well ordered, easy to read manner with nicely formatted comments, indenting and hierarchy (cascade) for easy finding of CSS styles in a structure similar to your HTML doc it all seemed to make more sense than previous articles I’d read. As well as small web sign projects at kc web design kent I do work on other large website design projects in bit teams of people and have never rally seen a perfect way of dealing with CSS doc layout. I’m very keen to try and stop my CSS docs becoming messy on web design projects at kc web design kent, and to try and clean up team based CSS doc writing, so I’m going to try and stick to the methods in this guide for a few months and see if it makes a difference to my web design projects and those larger team based projects to.