Designing the Hover State First
We now sketch the hover state before the resting state.
What moves and what stays
Performance was not the goal, but it came along anyway. Fewer styles, fewer scripts and fewer images add up quickly.
- Shift the element, not its neighbours
- Grow the shadow as the card lifts
- Keep the colour change to one step
The first version looked plain. The second version looked busy. The third version, with half the details removed, is the one we kept.
A good hover state feels like pressing a real button.
We asked a few readers to try it with a keyboard only. Two of them found problems in under a minute, which is exactly why we asked.
Browser support is no longer the excuse it used to be. Everything in this post works in every current browser without a fallback.
If you only change one thing after reading this, make it the spacing. Consistent gaps make even a rough layout look intentional.
Colour is the last thing we add. Getting the structure right in black and white first saves a lot of arguing later.
None of this is new. It is the same advice print designers have given for a century, moved onto screens.
We keep a scratch file of small experiments like this one. Most of them go nowhere, but a few end up in every project.
Clients rarely notice these details directly. They notice that the site feels solid, and that nothing jumps around when it loads.
The code is short enough to read in one sitting. That matters, because code you can read is code you can change.
We still get it wrong sometimes. The difference now is that fixing it takes one line instead of an afternoon.
7 thoughts on “Designing the Hover State First”
I tried this on a client site last week and it cut the stylesheet in half.
Agreed, this is how we do it too.
Love that you tested it with a keyboard. So few people do.
We shipped something similar last month. Can confirm it holds up.
Love that you tested it with a keyboard. So few people do.
Seconded. More posts like this.
We shipped something similar last month. Can confirm it holds up.