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
css
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
Interactive SVG map
I recently needed to present a map on a website so that visitors could choose their region (i.e. a group of countries, which could be arbitrary) before going into the site. After a little playing around, I settled on a solution that uses an SVG map of the world, and used CSS and Javascript to highlight … Continue reading Interactive SVG map
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
pShadow – a jQuery extension for gorgeous drop shadows
What's pShadow? pShadow, short for 'paper shadow', is a jQuery extension that adds realistic drop shadows to HTML elements, which works in Internet Explorer (IE8, IE7, IE6 with some clever trickery), Firefox, Chrome, Safari, Opera, and any other modern browser you care to mention. It's free to download and use, and you can see an … Continue reading pShadow – a jQuery extension for gorgeous drop shadows
Keeping track of time
Running your own business means a lot of extra effort, relative to a 'normal' job. True, there are the benefits of being your own boss, working the hours that suit you, taking holidays when you fancy, setting the prices you like. But in addition to being a Web Designer I also have to handle the … Continue reading Keeping track of time
Missing media buttons in WP 2.5 – partial fix!
I've been hovering on the WordPress forums recently, keeping my eyes peeled for a solution to my missing media buttons following up my upgrade to WordPress 2.5 a week or so ago. Today, prompted by a post by jeenie involving looking at the source code, I had a poke around and managed to get half … Continue reading Missing media buttons in WP 2.5 – partial fix!