We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56b250f commit 4ea2fd1Copy full SHA for 4ea2fd1
1 file changed
src/block/posts/style.js
@@ -287,7 +287,10 @@ Image.addStyles( blockStyles, {
287
const blockStyle = getBlockStyle( variations, className )
288
289
if ( [ 'horizontal', 'horizontal-2' ].includes( blockStyle?.name ) ) {
290
- if ( imageHasLink ) {
+ // If the image has a link and the width unit is %, return false
291
+ // because we have set a custom selector for the image width that uses the % unit.
292
+ if ( imageHasLink && ( getAttribute( 'imageWidthUnit' ) === '%' ||
293
+ getAttribute( 'imageWidthUnitTablet' ) === '%' ) ) {
294
return false
295
}
296
return true
0 commit comments