Back in the day, I had all my CSS in one file. Then I discovered Sass, and started separating everything out into different files. Today, I have a tried-and-tested approach to structuring my CSS to ensure it's tidy, powerful and easy to use. I call it GLOO, which stands for Globals, Layout, Objects and Overrides. … Continue reading GLOO – structuring your CSS
HTML
Using custom HTML attributes to define CSS state
TL;DR If an element should only have one state at a time, don't use classes, use custom attributes. <div class="tile" data-theme="dark">...</div> .tile[data-theme="dark"] {...} The old way Those of us who have been using off-the-shelf CSS frameworks for a few years will be familiar with the idea of using classes to define an element's properties. For … Continue reading Using custom HTML attributes to define CSS state
Code quality matters
We've all been there. Time is short, so just bash out a bit of code, and as long as it works we can move on. Code is for computers anyway, right? Who cares what it looks like? Actually, how our code is formatted can totally save our bacon later, and save us time in the … Continue reading Code quality matters
MODx – the best open-source CMS available?
Some background Some years ago I found myself taking on a large web project, managing a web site with several hundred pages, edited by several people with little (if any) knowledge of HTML, and which needed a serious overhaul. Initially I tried streamlining the process of dealing with all those static HTML files by creating … Continue reading MODx – the best open-source CMS available?