A personalised card manufacturer (with a ‘pork-related’ name) have recently rebranded with a swanky new site. The brand is a huge step forward and there’s some really nice parts to the online shop.
As part of the fun new brand direction, they’ve created some ‘hyper-illustrated’ buttons, a style which is pretty popular at the moment. Unfortunately, these buttons were created with images.
Not the end of the world I hear you cry, sometimes the design requires an image!
I accept there are definitely times when an image is required to fulfil the design requirements – we’ve all done it! But there are also ‘better’ ways of implementing said images. This image was not only low resolution and pixelated on retina monitors, it wasn’t accessible – the alt attribute was set as ‘theme 1’ and there was no supplementary copy to go with the link.
This points to a wider issue: using images in place of content. There are some pretty big drawbacks:
- It doesn’t scale
- It’s not accessible
- It can’t be indexed
- It can’t be animated (easily)
- It requires an extra HTTP request per image
- It’s a pain to create each time
I wanted to see how possible it would be to make a CSS equivalent of this image. After 15 minutes of work in Codepen, I’d come up with the following:
This works pretty nicely, it scales well, it responds to hover and active interactions, the colours can be changed and the content can be updated without disturbing the designer for the original image.
Sharing the code
It’s pretty normal for an agency to dissect and discuss a rebrand/redesign of a large company, it keeps us sharp and gives us an idea of current trends. We’re also keen not to jump on the brandwagon and dismiss someone’s work without knowing the brief. For that reason, we rarely express our opinions publicly. However, in this instance, the accessibility impact of these buttons seemed to justify tipping them off to the problem. Hopefully a more accessible solution will be deployed in the near future.
Hi there, we appreciate your feedback and will pass this on to the appropriate team.
— Moonpig (@MoonpigUK) October 6, 2017