Skip to content
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

Flash of Unstyled Content #83

Open
qrider opened this issue Apr 25, 2013 · 4 comments
Open

Flash of Unstyled Content #83

qrider opened this issue Apr 25, 2013 · 4 comments

Comments

@qrider
Copy link
Contributor

qrider commented Apr 25, 2013

Looks like there is no mechanism determining when the style sheets are loaded which has the potential of showing unstyled content on slow file loads. Currently we are experiencing this issue when going through a client proxy/relay.

I think this can be solved by providing an onload event for each stylesheet.
https://developer.mozilla.org/en-US/docs/HTML/Element/link#Stylesheet_load_events

@ilinkuo
Copy link

ilinkuo commented Apr 29, 2013

A possible future solution, should F2 adopt AMD as its loading mechanism, would be to use the stylesheet as a dynamic AMD dependency to ensure that it is loaded before F2 renders....

require(["css!yourStyleSheet.css",..], function(){
   .... F2.renderApp();
})

@brianbaker
Copy link
Member

Need to keep an eye on browser compatibility for something like this and how it relates to F2's browser compatibility.

@markhealey
Copy link
Member

According to the YepNope site, CSS callbacks were removed recently in favor of the official plugin.

@ilinkuo
Copy link

ilinkuo commented Jun 4, 2013

This might be useful -- http://www.phpied.com/when-is-a-stylesheet-really-loaded/

@brianbaker brianbaker removed this from the 2.0 milestone Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants