Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years 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 Owned by:
Priority: normal Milestone:
Component: Editor Version: 6.7
Severity: normal Keywords: 2nd-opinion needs-testing
Cc: Focuses: template

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
2 years 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
2 years ago

  • Component Media → 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
2 years ago

  • Milestone Awaiting Review
  • Resolution → reported-upstream
  • Status assigned → closed

#4 @abcd95
2 years ago

#62406 was marked as a duplicate.

Note: See TracTickets for help on using tickets.