Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Lack of theme leads to bad initial load experience #541

Closed
reedlabotz opened this issue Nov 4, 2014 · 5 comments
Closed

Lack of theme leads to bad initial load experience #541

reedlabotz opened this issue Nov 4, 2014 · 5 comments
Assignees

Comments

@reedlabotz
Copy link

Because md-theme needs angular to finish loading the app to add the theme classes, the initial load of the page has very bad styling.

It would be nice to have some better themes from initial page load.

@mlibby
Copy link
Contributor

mlibby commented Nov 7, 2014

Perhaps something like https://docs.angularjs.org/api/ng/directive/ngCloak for the whole page? Set a display: none rule on the body or specific elements using an md-cloak class, which is removed/replaced by after md-theme loads?

@plato-cambrian
Copy link

Polymer uses an attribute on the body element and programmatically
removes it when it is ready to paint the dom
I assume their hiding is simply CSS rules under body[attribute]

On Fri, Nov 7, 2014 at 10:39 AM, Michael C. Libby notifications@github.com
wrote:

Perhaps something like https://docs.angularjs.org/api/ng/directive/ngCloak
for the whole page? Set a display: none rule on the body or specific
elements using an md-cloak class, which is removed/replaced by after
md-theme loads?


Reply to this email directly or view it on GitHub
#541 (comment).

@rschmukler
Copy link
Contributor

@mlibby any reason to not just use ng-cloak for it then? Is this something that angular-material should provide?

@rschmukler rschmukler self-assigned this Nov 7, 2014
@mlibby
Copy link
Contributor

mlibby commented Nov 7, 2014

@rschmukler No reason to duplicate the ng-cloakfunctionality that I'm aware of. Unless there is reason to be concerned that md-theme wouldn't run until after ng-cloak.

@rschmukler
Copy link
Contributor

I don't think it'll be a problem. Alright, for now our official response is to use ng-cloak. Feel free to re-open if there are issues with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants