-
Notifications
You must be signed in to change notification settings - Fork 8
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
Handle FOUC - :defined
?
#11
Comments
There is option to use unresolved on body tag. This will smooth load the view but it means a small (currently half a second) wait until view is rendered. Webpack has option to load js "when needed" so when this first (unresolved) option becomes too bearing, we could try that option. |
I guess we will see how the loading experience will be on WP, soon. Further decisions to be made then. |
Tested, this works exactly as per Google docs and desired: cxl-institute-layout:not(:defined) {
/* Pre-style, give layout, replicate app-drawer's eventual styles, etc. */
display: block;
height: 100vh;
opacity: 0;
transition: opacity 0.3s ease-in-out;
} @chanar can layout component get this, or needs to be part of app-level CSS? |
if :not(:defined) works the same then why did they introduce it in webcomponents. Don't know what's right, can go with :defined https://www.html5rocks.com/en/tutorials/webcomponents/customelements/#fouc
Different view on subject https://gist.github.com/ebidel/1ba71473d687d0567bd3 |
WICG/webcomponents#418 makes it clear: |
It turns out Ref: https://github.com/Polymer/polymer/blob/v3.3.1/lib/utils/unresolved.js |
Custom elements take time to get upgraded, which means we might see a flash of unstyled content.
https://developers.google.com/web/fundamentals/web-components/customelements#prestyle
@chanar thoughts?
The text was updated successfully, but these errors were encountered: