-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Description
amp-story.rewriteStyles_() does not need to run in non one-panel-desktop contexts.
amphtml/extensions/amp-story/1.0/amp-story.js
Lines 547 to 561 in f3a2396
| /** | |
| * @param {!Element} styleEl | |
| * @private | |
| */ | |
| rewriteStyles_(styleEl) { | |
| // TODO(#15955): Update this to use CssContext from | |
| // ../../../extensions/amp-animation/0.1/web-animations.js | |
| this.mutateElement(() => { | |
| styleEl.textContent = styleEl.textContent | |
| .replace(/(-?[\d.]+)vh/gim, 'calc($1 * var(--story-page-vh))') | |
| .replace(/(-?[\d.]+)vw/gim, 'calc($1 * var(--story-page-vw))') | |
| .replace(/(-?[\d.]+)vmin/gim, 'calc($1 * var(--story-page-vmin))') | |
| .replace(/(-?[\d.]+)vmax/gim, 'calc($1 * var(--story-page-vmax))'); | |
| }); | |
| } |
cc @ampproject/wg-stories @Gregable
Alternatives Considered
Additional Context
No response
Reactions are currently unavailable