-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't separate keyframes for AMP Stories (#653)
Fixes #652
- Loading branch information
1 parent
701d7a6
commit 443d80c
Showing
4 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...imizer/spec/transformers/valid/SeparateKeyframes/ignores_amp_stories/expected_output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!doctype html> | ||
<html amp lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
<title>My Story</title> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | ||
<link rel="canonical" href="helloworld.html"> | ||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
<style amp-custom> | ||
.another{display:block}@keyframes anim1{from{opacity:0}top{opacity:1}}.foo{height:0}@keyframes anim2{from{opacity:1;}to{opacity:0;}} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<amp-story standalone> | ||
|
||
<amp-story-page id="cover"> | ||
<amp-story-grid-layer template="vertical"> | ||
<h1>Hello World</h1> | ||
<p>This is the cover page of this story.</p> | ||
</amp-story-grid-layer> | ||
</amp-story-page> | ||
|
||
<amp-story-page id="page-1"> | ||
<amp-story-grid-layer template="vertical"> | ||
<h1>First Page</h1> | ||
<p>This is the first page of this story.</p> | ||
</amp-story-grid-layer> | ||
</amp-story-page> | ||
|
||
<amp-story-page id="page-2"> | ||
<amp-story-grid-layer template="vertical"> | ||
<h1>Second Page</h1> | ||
<p>This is the second page of this story.</p> | ||
</amp-story-grid-layer> | ||
</amp-story-page> | ||
</amp-story> | ||
</body> | ||
</html> |
41 changes: 41 additions & 0 deletions
41
packages/optimizer/spec/transformers/valid/SeparateKeyframes/ignores_amp_stories/input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!doctype html> | ||
<html amp lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
<title>My Story</title> | ||
<meta name="viewport" | ||
content="width=device-width,minimum-scale=1,initial-scale=1"> | ||
<link rel="canonical" href="helloworld.html"> | ||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
<style amp-custom> | ||
.another{display:block}@keyframes anim1{from{opacity:0}top{opacity:1}}.foo{height:0}@keyframes anim2{from{opacity:1;}to{opacity:0;}} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<amp-story standalone> | ||
|
||
<amp-story-page id="cover"> | ||
<amp-story-grid-layer template="vertical"> | ||
<h1>Hello World</h1> | ||
<p>This is the cover page of this story.</p> | ||
</amp-story-grid-layer> | ||
</amp-story-page> | ||
|
||
<amp-story-page id="page-1"> | ||
<amp-story-grid-layer template="vertical"> | ||
<h1>First Page</h1> | ||
<p>This is the first page of this story.</p> | ||
</amp-story-grid-layer> | ||
</amp-story-page> | ||
|
||
<amp-story-page id="page-2"> | ||
<amp-story-grid-layer template="vertical"> | ||
<h1>Second Page</h1> | ||
<p>This is the second page of this story.</p> | ||
</amp-story-grid-layer> | ||
</amp-story-page> | ||
</amp-story> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
<body> | ||
<p>I should come before style[amp-keyframes]</p> | ||
</body> | ||
</html> | ||
</html> |