-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boilerplate change- Switch from using opacity and settimeout to using visibility and keyframe animation. #998
Conversation
f8b0eb8
to
1ad79a1
Compare
@@ -81,8 +82,11 @@ export function installStyles(doc, cssText, cb, opt_isRuntimeCss) { | |||
export function makeBodyVisible(doc) { | |||
let interval; | |||
const set = () => { | |||
|
|||
if (doc.body) { | |||
doc.body.style.opacity = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setStyle(doc.body, {
opacity: 1,
visibility: 'visible',
animation: 'none'
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont we want setStyles
All looks great. Just few minor comments. One thing, though, please make the research/spec doc public and link it from the description of this PR. |
1ad79a1
to
d1c7be7
Compare
@@ -82,7 +83,11 @@ export function makeBodyVisible(doc) { | |||
let interval; | |||
const set = () => { | |||
if (doc.body) { | |||
doc.body.style.opacity = 1; | |||
setStyle(doc.body, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be setStyles (notice 's')
LGTM once setStyles and tests are fixed. |
d1c7be7
to
33dd16d
Compare
Yes. We won't make the change public until the validator is deployed.
|
You'll probably need to update the samples as well, so that they'll validate |
Will do
|
33dd16d
to
903df8b
Compare
@sriramkrish85 This is ready to be merged. Right? |
Yes ,will have to update example files once validator is ready. Else they
|
Let's merge this PR. We will update examples and documentation once validator is ready. |
Switch from using opacity and settimeout to using visibility and keyframe animation.
903df8b
to
82fc726
Compare
Support for Boilerplate change (Switch from using opacity and settimeout) using visibility and keyframe animation.
I'm not sure this issue should be closed as long as the documentation is still saying that the style with opacity:0 is required: https://github.com/ampproject/amphtml Or should another issue be opened for updating the docs? |
Switch from using opacity and settimeout
to using visibility and keyframe animation. #323
Detailed proposal can be viewed here:
https://docs.google.com/document/d/1gZFaKvcDffceJNaI3bYfuYPtYU5u2y6UhE5wBPTsJ9w