When I move my files from the main www folder to a traditional web server, all of the elements seem to get larger than when I use ionic serve. I don’t know if I am missing some step to host them on a different web server, but I can’t find any clear documentation on how to just host the static site somewhere else. I am not using anything native, its just a plain web app, so I don’t need to compile it with the cordova browser platform, but when I tried too, and took the files from the platform www folder as well, it does the same thing. I also tried ionic build --prod and it does the same thing. To me, it seems as though some CSS values are missing, or its pulling the wrong css values when running in a normal web server.
Could you provide screenshots of your app so we can understand the problem?
This image is from ionic serve
This is running from www copied to an apache server
Ok, got it.
Did you inspect the elements (a button for example) in your browser to see where it gets it’s font size definition from? See https://developers.google.com/web/tools/chrome-devtools/inspect-styles/ for more information what I am talking about.
Are they different between the two deployments?
Looking into it, I found this interesting. Even when hitting view source, the text is bigger from Apache. I wonder if this is an apache setting, not an issue with ionic.
This first image is running from ionic serve
This is running from apache.
Oh, this sounds like something totally different:
Please switch to a different browser and look at both URLs. Same size? Then your default browser has Zoom enabled for one of the both URLs. Press Ctrl + 0 to reset.
In Chrome, they are different, in Safari, they are the same, but both are the larger font. The zoom on Chrome is both set to default.
Strange. Try installing Firefox and look at it there? Something fishy is going on. There is no way to configure Apache that affects font size…
Firefox is the same local and apache. But it is still larger. The only one that looks correct, and how I want and expect it is Chrome on ioinic serve. Safari also is not loading ordering correctly for my ionic grid.
Chrome ionic serve
safari ionic serve
Did you ever find a solution for this? Im experiencing the same thing. Thanks!