Skip to content

Commit 2cd1d89

Browse files
authored
fixed (posts block): change hover selector for portfolio, portfolio-2, and image-card (#3667)
1 parent 4ea2fd1 commit 2cd1d89

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/block/posts/style.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,19 @@ Image.addStyles( blockStyles, {
310310
}
311311
return selector
312312
},
313+
hoverSelectorCallback: getAttribute => {
314+
const className = getAttribute( 'className' )
315+
const blockStyle = getBlockStyle( variations, className )
316+
317+
if ( [ 'portfolio', 'portfolio-2' ].includes( blockStyle?.name ) ) {
318+
return `${ itemSelector }:hover .stk-img-wrapper img`
319+
}
320+
321+
if ( [ 'image-card' ].includes( blockStyle?.name ) ) {
322+
return `.stk-block-posts__image-card-container:hover img`
323+
}
324+
return '.stk-img-wrapper:hover img'
325+
},
313326
widthStyleRuleCallback: getAttribute => {
314327
const className = getAttribute( 'className' )
315328
const blockStyle = getBlockStyle( variations, className )

0 commit comments

Comments
 (0)