Make WordPress Core

Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#62376 closed defect (bug) (reported-upstream)

WP 6.7: Adding Anchor Link to Media & Text Block Sets Link to Inline-Block

Reported by: ajmaurya's profile ajmaurya Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.7
Component: Editor Keywords: 2nd-opinion needs-testing
Focuses: template Cc:

Description

When adding an anchor link to the Media & Text block, the following CSS style is applied, causing the media to display at a reduced size.

Testing with a medium media size results in the image width being limited to 300px, making the media appear too small.

In the Editor the media size looks perfect.

.wp-block-media-text__media a {
    display: inline-block;
}

Demo -
https://share.zight.com/7KuN5mYJ

Change History (4)

#1 @ankitkumarshah
13 months ago

Hi @ajmaurya,

Thank you for bringing this up. It appears that this issue is related to Gutenberg, so I’ve opened an issue in the Gutenberg repository for further review.

https://github.com/WordPress/gutenberg/issues/66914

Thanks again for your help.

#2 @sabernhardt
13 months ago

  • Component changed from Media to Editor

PR 62556 added the inline-block display (on the front end) to fix an issue with the focus outline.

If your Medium size is 300 pixels, selecting that Resolution in the block settings would fetch the image file that is only 300 pixels wide. I think that if 300 is too small, you would need to select a larger resolution so it does not stretch and pixelate.

#3 @poena
13 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from assigned to closed

#4 @abcd95
13 months ago

#62406 was marked as a duplicate.

Note: See TracTickets for help on using tickets.