-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow body FOUC prevention to be optional #197
Comments
The intent was to make it opt-out so that new users avoid a common FOUC problem, and anybody that wants out can use something like this: body {
/* Prevent Polymer from handling FOUC for us */
opacity: 1.0 !important;
transition: none !important;
} [cribbed from ebidel's chromium-dashboard to be meta] We obviously didn't communicate this properly from the code. I believe we intended to have a class that did the above, but didn't follow through. Thank you for working it out the hard way. What do you think about opt-in vs. opt-out for FOUC prevention? |
I think it would be better to take the FOUC prevention out and just give it as an example use in the documentation for I looked for a runtime configuration switch when I wanted to disable the FOUC prevention. But, I didn't see it there. An opt-in configuration switch would be nice: <script src="platform/platform.js" prevent-fouc></script> In the meantime, it is nice to see the |
+1 on opt-in. FWIW, Angular has an opt-in Two other examples:
On Wed, Aug 14, 2013 at 6:20 AM, dannyfritz [email protected]:
|
Agreed, but this is a special case IMO. The application itself gets to use the
Vote heard. But to be fair, your examples don't clearly advocate for opt-in vs. opt-out, to wit:
They probably are slower by virtue of loading stuff. There is no inherent delay caused by the FOUC prevention, unless the fade-in duration is simply too long (which it probably is).
Sure, this is why there is 'opt' at all. The question is, is it better to have newbies faced with FOUC and needing to go learn about it, or better to put the burden on folks that know enough to make choices like above. |
Vote heard. |
I was saying that the current mechanism uses We can also use opt-in as a way to advocate |
Of course, but in apps we make, that is ideally the minimum amount of stuff needed before the app is ready to be visible. |
Addressed via 24b3b3b. |
boot.js sets the opacity of the body to 0 and transitions it to 1 on
WebComponentsReady
.This is problematic for a few reasons:
WebComponentsReady
. Painting is expensive.We should push folks to use
:unresolved
where it is available.The text was updated successfully, but these errors were encountered: