In my case, the offending style rule appears to be one with selectors generator for every color in my $colors sass variable, with permutations for EVERY ionic element that they could be applied to. For some reason Chrome Dev tools claims that this style is being applied even to the tag, but it doesn’t look like that would match any of the selectors.
Copy/pasting the selector list into VSCode, it is 395357 characters, and does not contain “html”, “body”, or “ion-app” as complete words, all of which elements show that they are affected by this rule in dev tools.
Ok, sorry to spam this thread, but I went into variables.scss and removed a number of colors from $colors that I wasn’t using, saved the file, ran ionic platform remove android and then ionic run android and now the app displays correctly. (I’ve been removing and re-adding the android platform with all of the previous things I’ve tried, so that shouldn’t have been what fixed it)
In the remote debugger I no longer see the “every color combination with every kind of button possible” style showing up, but a search through www/build/main.css for “opacity:.4” shows that this style rule is still being generated.
Maybe I actually had so many colors defined that the generated rule was somehow too long for the webview’s css parser to handle?
Thanks for pointing me in the right direction.
I have 35 colors defined in the $colors section in variables.scss. There is also a list of all social networks we might support in the future (but just not yet). Thanks to that, I could remove 19 colors from the list. After doing this, it worked fine.
I saw that, with all 35 colors in the list, the generated main.css was 5.1MB in size. After removing 19 colors, the generated main.css is ‘only’ 1.5MB. I have the impression that a lot of stuff is generated for every color in the list. I don’t know if this is a good idea or not… A minified CSS file of +5MB seems to be a bit large compared to the CSS I wrote in the source code (max 500 lines of myself).
Anyway, it looked like a strange solution and my hope wasn’t too high, but it worked. Thanks!