Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Image block with link set shows a bottom border in the middle of the image #56090

Open inaikem opened 3 years ago

inaikem commented 3 years ago

Quick summary

When adding a link to a normal Image block, the block will render a line behind the image.

The line is a CSS bottom border set on the image's container A tag. See the screenshot below:

Image block bottom border

Steps to reproduce

  1. Add an image block to a post/page.
  2. Add a link to the image.
  3. Preview/publish the post/page.

What you expected to happen

What actually happened

Context

User report: 4258389-zen

Operating System

Windows, macOS, Linux, Android, iOS

Browser

Google Chrome/Chromium

Simple, Atomic or both?

Simple, Atomic

Theme-specific issue?

No

Other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

Yes, difficult to implement

Workaround details

We can remove the border via CSS on Atomic sites. There is no workaround for Simple sites.

synora commented 3 years ago

Triaged. Unless I missed something, I'm unable to replicate the horizontal line using the same theme (Blank Canvas):

Screen Shot on 2021-09-09 at 08-50-56
inaikem commented 3 years ago

Unless I missed something, I'm unable to replicate the horizontal line using the same theme (Blank Canvas)

I should have covered that. Good catch! Try a logo that contains some transparency on the left and right sides. The bottom border on the A element appears behind the image. Here's the image I tested with:

Bug Herders Wapuu v2

dpasque commented 3 years ago

Tagging @Automattic/flow-patrol-create based on issue content

synora commented 3 years ago

@inaikem Bingo! It sounds like images with transparency of some sort maybe causing this issue. I tested again with your image versus my original image.

Screen Shot on 2021-09-10 at 13-16-57 (1)

The logo in the user report seems to have some transparency as well.