ampproject / ampproject/amphtml
[AMP Story] [Safari] Grid layer with aspect ratio unmatching text layout
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Exemple: https://join-test.my.join-stories.com/repro-2-TH3ofU3/?t=314
When using the `amp-story-grid-layer` with the aspect-ratio attribute with the recommended preset `2021-foreground` the text still change its layout (the line breaks change) when playing with the responsiveness of the page.
The text box is in `%`, the font-size in `em`. The text should keep its layout no matter the size of the window.
The bug is currently only happening on safari and iOS browsers.
### Reproduction Steps
Randomly create a text in an aspect-ratio container using percentage and em.
Play with the window size and the line break might change depending on the window size.
### Relevant Logs
_No response_
### Browser(s) Affected
Firefox, Safari
### OS(s) Affected
iOS
### Device(s) Affected
iPhone
### AMP Version Affected
_No response_
Contributor guide
Research direction
Start with the linked reproduction at join-test.my.join-stories.com/repro-2-TH3ofU3 and inspect the amp-story-grid-layer aspect-ratio behavior while resizing in Safari or iOS. Compare the text layout using percentage sizing and em font sizes across the affected browsers. Done means line breaks remain stable as the window size changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100