I use this code to create hover animation for topic avatars.
Can you provide me with how to translate the recommended Google Material Design to pixels.
Here’s my code:
`.topic-avatar img {
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
transition: box-shadow 0.3s ease-in-out;
transition: transform .2s ease-in-out;
}
.topic-avatar img:hover {
box-shadow: 0 8px 10px rgba(0,0,0,0.3);
transform: scale(1.1);
image-rendering: auto;
image-rendering: crisp-edges;
image-rendering: pixelated;
}
`
Looks prety neat. try it out.
The image resize isn’t sharp because the original icon size is small and have no room to animate. I used image-rendering to sharpen when it’s hover, but it’s still not perfect. I see if I the image rendering can work while the transition is taking effect.