Hello everybody,
I’m porting my project from beta11 to rc0.
In beta11 I used to have some global css configuration to change the toolbar color app-wide in ‘app.core.scss’ file:
and it worked fine.
I tried to reproduce that behavior by copying those configurations in global.scss, but it seems that this file is not considered by the ionic build system.
The same behavior applies in the tabs app created by default with ‘ionic start projectname --v2…’ .
In ‘node_modules/@ionic/app-scripts/config/sass.config.js’ i noticed that for the key variableSassFiles only variable.scss is loaded.
I tried to load the file manually by adding ‘@import “global”;’ and it seems to get loaded but my configurations are overridden by ionic defaults in the compiled main.css.
Hi @reedrichards, thank you for answering!
As I wrote I already tried to import global.scss in the variables file but my css are overridden by the default theme. I guess that the variables.scss is compiled before the default ionic theme. since it appears on top of the main.css.
For now i solved it by creating a custom class for my app where i put my app-wide configurations, but I’ll have to reference it in my templates.
I read that someone created a app.component.scss and put his code inside that file instead of global.scss (if I understand correctly). Didn’t tried but maybe that is a way too?