ampproject / ampproject/amphtml

Gmail ignores `heights` property

Open
#40,251 5 comments 11 reactions 1 assignee Claimed by @erwinmombay View on GitHub
Type: Bug WG: amp4email
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

I'm trying to use the [heights](https://amp.dev/documentation/guides-and-tutorials/email/learn/amp-html-layout/#heights) property on an `amp-list` in an AMP email, and it looks correct in the AMP playground but does not work in the Gmail web or mobile apps.

It seems that Gmail ignores the `heights` attribute altogether and just uses the aspect ratio from `width` and `height`.

## Appearance in Playground (correct)

Wider than breakpoint

![Image](https://github.com/user-attachments/assets/faf660fb-afad-4b45-8559-b04b05828a4a)

Thinner than breakpoint

![Image](https://github.com/user-attachments/assets/9de68abc-91fb-4d17-a7cf-cafb90a6588f)

## Appearance in Gmail (incorrect)

Gmail web app (wider than breakpoint)

![Image](https://github.com/user-attachments/assets/e5087e15-de94-4bb2-ab8d-32750d53941b)

Gmail mobile app (thinner than breakpoint)

![Image](https://github.com/user-attachments/assets/d9ac598a-fa2e-43b5-9c42-d8ee9c034032)

### Reproduction Steps

View this email in the AMP playground and compare it to the Gmail mobile or web app to see the discrepancy.

```






body{visibility:hidden}

body {
font-family: sans-serif;
padding: 1rem;
}

.info {
margin-bottom: 1rem;
}
amp-list {
border: 2px dashed blue;
}




This AMP email tests the heights property on amp-list within a constrained container.
When the viewport is smaller than 500px, the dashed box should be 800px tall. When the viewport is wider than 500px, it should be only 100px tall.



{{title}}



```

### Relevant Logs

```shell

```

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.