Skip to content

<figure> element wrapping an <amp-img> element is mis-sized #25032

@schlessera

Description

@schlessera

What's the issue?

When wrapping an element with layout="intrinsic" in a

element, the wrapping has a height that is a few pixels larger then the image it wraps.

This problem seems to be unrelated to any CSS being parsed, so I assumed this is JavaScript behavior inside the element that is broken.

Image 2019-10-14 at 11 53 04 AM

How do we reproduce the issue?

Markup to reproduce:

<figure>
    <amp-img src="https://via.placeholder.com/580x300"
             width="580"
             height="300"
             layout="intrinsic"></amp-img>
</figure>

See https://codepen.io/schlessera/pen/BaaKaxo

What browsers are affected?

Tested in Google Chrome Version 77.0.3865.120 (Official Build) (64-bit)

Which AMP version is affected?

Seen in version 1910071803120.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions