DEV Community

Discussion on: Animated Social Media Icons With Pure CSS

Collapse
 
jamesthomson profile image
James Thomson

It's a good start. As a usability rule of thumb, hovering something should never cause layout shift. In your case, when you hover the "Hover us please" text, it causes the width to change which in turn causes layout shift.

I've quickly updated your Codepen with a couple of changes to help show you how to center your box and use widths to avoid layout shift.

codepen.io/getreworked/pen/BaQxpBW

Collapse
 
madflows profile image
Folarin Lawal

I've Worked on that too, I'll update the codepen now

Collapse
 
madflows profile image
Folarin Lawal

I also Made it in a way that the background color changes as you click on the icons :)