Skip to content

[Story] Broken layouts for any publisher using vh units #36711

@gmajoulet

Description

@gmajoulet

Description

Any publisher using vh units have their layout broken. We used to calculate --story-page-vh from the JavaScript and set it to 1% of the story-page height, when it's now set to 1vh. In most Web browsers, 1% isn't equivalent to 1vh.

Let's keep the initial 1vh CSS introduced in the PR so we can move forward with our performance improvements, but override it back to 1% once JavaScript executes.

https://github.com/ampproject/amphtml/pull/36033/files#diff-94f9e2fa2969f98d22c37d9e1f195adbe79ebda93b4ffedf4eab34327238418fL628-L653

cc @ampproject/wg-stories

Reproduction Steps

Bad:
image

Expected:
image

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions