-
-
Save carolineschnapp/63fd3c4327a466174aa8 to your computer and use it in GitHub Desktop.
/* =============================================== | |
// Reveal module | |
// =============================================== */ | |
.reveal .hidden { display: block !important; visibility: visible !important;} | |
.product:hover .reveal img { opacity: 1; } | |
.reveal { position: relative; } | |
.reveal .hidden { | |
position: absolute; | |
z-index: -1; | |
top: 0; | |
width: 100%; | |
height: 100%; | |
opacity: 0; | |
-webkit-transition: opacity 0.3s ease-in-out; | |
-moz-transition: opacity 0.3s ease-in-out; | |
-o-transition: opacity 0.3s ease-in-out; | |
transition: opacity 0.3s ease-in-out; | |
} | |
.reveal:hover .hidden { | |
z-index: 100000; | |
opacity: 1; | |
} | |
.reveal .caption { | |
position: absolute; | |
top: 0; | |
display: table; | |
width: 100%; | |
height: 100%; | |
background-color: white; /* fallback for IE8 */ | |
background-color: rgba(255, 255, 255, 0.7); | |
font: 13px/1.6 sans-serif; | |
text-transform: uppercase; | |
color: #333; | |
letter-spacing: 1px; | |
text-align: center; | |
text-rendering: optimizeLegibility; | |
} | |
.reveal .hidden .caption .centered { | |
display: table-cell; | |
vertical-align: middle; | |
} | |
@media (min-width: 480px) and (max-width: 979px) { | |
.reveal .caption { | |
font-size: 11px; | |
} | |
} |
Hi there, I am trying to use this update for the Cascade theme in Shopify and it is not working for me. Can you please tell me how I can get this to work for the Cascade theme?
Thank you!
Does this code no longer apply? I am using Canopy theme and the only style sheet is styles.scss.liquid. I have added all of the code mentioned very carefully, and nothing happening. I turned off the "Quick Buy" option in Canopy theme thinking maybe it was conflicting as it puts a little banner on top of the main image, but still no go.
The code no longer works on Brooklyn or just for me, any tip?
Does this code no longer apply? I am using Canopy theme and the only style sheet is styles.scss.liquid. I have added all of the code mentioned very carefully, and nothing happening. I turned off the "Quick Buy" option in Canopy theme thinking maybe it was conflicting as it puts a little banner on top of the main image, but still no go.
Hi Krittleb , Did you ever manage to resolve the issue??? Trying to do this on my canopy.
The original code is not working. This YT video works for debut theme on 2019.
https://www.youtube.com/watch?v=9uxSrOxxZpY
Hi, thanks for sharing your nice code. I was wondering if anyone has experience any problems with the hovering effect on safari. In a preview of my page, the hovering does not occur on Safari but on all other browsers. Why could this be?
Hello there! I'm trying the code on the Minimal theme, but when I add the extra code from the Shopify guide (https://help.shopify.com/en/themes/customization/collections/add-hover-effect-to-product-images), all the images disappear.
I am adding the extra code from the guide to my product-grid-item.liquid snippet, ...which looks a bit different from what's in the guide actually - I'll paste part of the snippet below.
The guide says I have to create a
div class="reveal"
around the img tag and then add<img class="hidden" src="{{ product.images.last | img_url: 'large' }}" alt="{{ product.images.last.alt | escape }}" />
right before the end of that div.I tried adding the extra code both to the first img tag and to all 3 of the img tags I found on that product-grid-item.liquid snippet. The result is the same, the images disappear.
Any clue?
Here is a good portion of the product-grid-item.liquid snippet: