ampproject / ampproject/amphtml
[amp-story] AmpStory runtime replacing vh/vw in css classnames
Open
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
Assessment
This issue has not been assessed yet.