Reputation: 417
I am designing a dark theme for my ionic application by following this Tutorial. It works for most of the classes but, there are some css classes which only change when i override them in app.scss, if i override them in theme.dark.scss they remain unaffected.
for example here's an ionic alert class .alert-md .alert-wrapper
if i change the background-color and color in app.scss, it reflects the changes. But, if i do the same in theme.dark.scss, it doesn't do anything.
I've tried using !important in theme.dark.scss but still it doesnt change the background-color and color of that class.
Is there any way to override the css in the theme.dark.scss file?
Help is appreciated.
Upvotes: 0
Views: 739
Reputation: 64
In Variable.css you would find and change as below:-
// From
@import "ionic.theme.default";
// To
@import "ionic.theme.dark";
This would make you theme dark and then you can make appropriate changes as needed.
Please follow below link for more explanation.
https://coursetro.com/posts/code/117/How-to-Properly-Use-Ionic-Theme-Variables
Upvotes: 0
Reputation: 76
you can change your background color in variables.scss
or override the background color
Upvotes: 1