Hello,
in the debut theme the standard is opacity on hover. I want to reverse that, that the pictures are cleared of opacity on hover in the blog grid.
If possible only in one blog because there are two on my site:
interviews (where I wish to have reversed opacity)
articles (with theme standard opacity settings, no changes)
It´s just that the headline is now affected with opacity too. How can I apply this to the image only? And can this effect target just one blog instead of all blogs globally?
Your theme structure is slightly different from our Debut. So we re-wrote the styles.
To get started, you will need to delete a couple of lines here:
.article__link:not([disabled]):hover .article__grid-image-wrapper::before, .article__link:focus .article__grid-image-wrapper::before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: var(--color-image-overlay); - this line need to delete
opacity: var(--opacity-image-overlay); - and this one you need to delete
z-index: 1;
}
Next, you can delete the styles that we sent you, they are no longer relevant.
Now, I have one blog, where your given answer shall be applied and one where the default shall remain.
For this I created a new blog template (& section) called blog.blog-fade-out & blog-fade-out-template (in hindsight, I should have called it fade-in for it´s purpose).
.article__link:not([disabled]):hover .article__grid-image-wrapper::before, .article__link:focus .article__grid-image-wrapper::before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: var(--color-image-overlay); - this line needs to except blog.blog-fade-out or the section
opacity: var(--opacity-image-overlay); - and this one too needs to except blog.blog-fade-out or the section
z-index: 1;
}
How can I except the new blog from those two lines of global code?
For now, delete these lines. the ID is already specified in the template #shopify-section-blog-fade-out-template. Let’s make it a default template. Add this id to an already existing style, as in the example below:
In this way, we isolate our solution specifically for this template.
For another template, with the id #shopify-section-blog-fade-out, you need to return these two lines, but as a separate style, as in the example below, specifying the id of the already given theme: