Skip to content

Commit 4e6c022

Browse files
committed
change hover selector for portfolio, portfolio-2, and image-card
1 parent 3aabbe5 commit 4e6c022

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/block/posts/style.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,19 @@ Image.addStyles( blockStyles, {
307307
}
308308
return selector
309309
},
310+
hoverSelectorCallback: getAttribute => {
311+
const className = getAttribute( 'className' )
312+
const blockStyle = getBlockStyle( variations, className )
313+
314+
if ( [ 'portfolio', 'portfolio-2' ].includes( blockStyle?.name ) ) {
315+
return `${ itemSelector }:hover .stk-img-wrapper img`
316+
}
317+
318+
if ( [ 'image-card' ].includes( blockStyle?.name ) ) {
319+
return `.stk-block-posts__image-card-container:hover img`
320+
}
321+
return '.stk-img-wrapper:hover img'
322+
},
310323
widthStyleRuleCallback: getAttribute => {
311324
const className = getAttribute( 'className' )
312325
const blockStyle = getBlockStyle( variations, className )

0 commit comments

Comments
 (0)