Hi ppl,
trying to zoom images on hover using this css snippet:
.image-with-text__media {
transition: all 0.3s !important;
}
.image-with-text__media:hover {
transform: scale(1.1) !important;
}
The preview does exactly what I want (zoom on hover), but whenever I try to save the custom CSS I get the error “Online Store editor session can’t be published”. The problem is definitely caused by the scale command as it saves as soon as that bit is deleted. Is this a bug or why does shopify not support this command?
A work around is:
.image-with-text__media {
transition: all 0.3s !important;
}
.image-with-text__media:hover {
width: 110%;
height: 110%;
}
But this ends up being a weird animation, first extending the width and then the height dimension, not the smooth transition as by using scale command.
I am using the new feature “Custom CSS” in the theme editor and did not try to add this code to any specific files as all other custom CSS commands worked just fine using the custom css field for multiple other sections.