ampproject / ampproject/amphtml

[amp-story] AmpStory runtime replacing vh/vw in css classnames

Open
#29,540 8 comments 0 reactions 1 assignee Claimed by @gmajoulet View on GitHub
P3: When Possible Stale Type: Bug WG: Caching: Triaged WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## What's the issue?
Looks like the amp runtime is being a little over aggressive in it's vh/vw replacements as it's replacing the pattern `/\d+v[hw]/i` in class names effectively breaking the selectors and css

i.e. `.cardText__1VW` gets turned into `.cardText__calc(1 * var(--story-page-vw))`

## How do we reproduce the issue?
Add a class to an element with the pattern above and render the html in amp

## What browsers are affected?
All

## Which AMP version is affected?
Seemingly just amp stories, but no clue where else this could be affecting

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.