I’ve read the doc, searched for GitHub all open and closed issues and other sources but can’t solve this issue.
Specifically, inside global.scss there is the line @import '~@ionic/angular/css/structure.css' that gives blank screen without throwing any error when compiling to browser (Chrome), but works fine when compiling to Mobile (Capacitor + Android Studio + physical device).
Workaround: I have to commented out that line to make it work on Browser, but on Mobile I lose the structure of this specific global stylesheet and therefore all predefined CSS structure.
Not sure how I can solve this issue without the need to comment such line.
Hi, I had a similar problem with a white screen caused by global.scss, specifically because of ~@ionic/angular/css/structure.css" in it.
I have a loading spinner that gets set up on index.html. Without ‘structure.css’:
index.html loaded: loading spinner is visible
app bootstrapping: loading spinner is still visible
finished bootstrapping: main app is visible.
But with ‘structure.css’:
index.html loaded: loading spinner is visible
app bootstrapping starts: loading spinner is still visible
sometimes after styles.js finished loading: HTML page completely white
it now stays completely white for some time
Very closely to the end of the complete bootstrapping, the loading spinner appears again
This is completely reproducable. To view it nicly I made the network connection a little bit slower and disabled caching, so it had to reload everything:
Which also says: fix(runtime): always add .hydrated to <html>
It would be great if anyone could confirm that doing this has no bad effects on other parts of the application? Currently it looks good for me, it replaces it as soon as ionic things start loading. I tested it on browser and on android.
Hey KevinB1, thanks and nice to know that I wasn’t the only crazy one.
Yes, I did something similar by overriding that block and put into app.component.scss, like this:
html:not(.hydrated) body {
display: initial !important;
}
But, now that you have replied me and I went to check your solution to try in my code and realized that the Ionic team must have already fixed it. For me, it is no longer necessary to override whatsoever, please check in your side.