-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix Flash of Unstyled Content (FOUC) issue #156
Conversation
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.
Kindly make the changes as described.
addons/gst-web/src/index.html
Outdated
@@ -123,12 +123,13 @@ | |||
word-wrap: normal; | |||
direction: ltr; | |||
} | |||
body { background-color: #000000; } |
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.
Format the code as following:
body {
background-color: #000000;
}
addons/gst-web/src/index.html
Outdated
@@ -385,6 +386,9 @@ | |||
</div> | |||
</v-app> | |||
</div> | |||
<style> | |||
[v-cloak] { display: 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.
Include this style rule in the style tag of head section. Format it as following:
[v-cloak] {
display: 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.
Looks Good To Me.
The addition of the v-cloak directive and the accompanying CSS rule will help to prevent the application from displaying partially loaded or unstyled content while it's loading.
The Flash of Unstyled Content (FOUC) is likely caused by the way the Vue.js application is initialized and rendered. The root cause is that the HTML content is rendered before the Vue.js application is mounted and the styles are applied.