ampproject / ampproject/amphtml
Rewriting of viewport units does not work for inline styles
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
For stories, we rewrite viewport units (i.e. `vw`, `vh`, `vmin`, `vmax`) to refer to the size of the `amp-story-page`, rather than the user's actual viewport, since the page can sometimes be smaller than the viewport.
However, we only apply this transformation to styles specified in the `` tag. Since the initial implementation of this feature, AMP has expanded the flexibility to allow for inline styles; we need to also this transformation to inline styles as well.
Contributor guide
Research direction
Start by locating the existing viewport-unit transformation for AMP stories and then trace how inline styles are processed. Add coverage for inline styles using vw, vh, vmin, and vmax; done means those units are rewritten for both inline styles and styles in the amp-custom tag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100