'Cordova Android Build Dose Not Consider Some Of my Styles

Hello Guys I am using angular for developing an application my output on web is totally fine but when i use cordova to build for android its seems like some of my styles does not considered i checked style.css file and my style is there here is a picture of android build. Android Out put

as you can see some of styles work correctly like back ground of items that supposed to be purple or title of the items but information below that should not me blue or color of my button for add more boards. any one run into this problem before or like always i am first one ?



Solution 1:[1]

i did not understand why this happen but in my case it went away with dynamic styling.

so for that in mind i created a service for managing colors, and i defined all used colors in my project as string variables and set those variables to my colors hex code.

my service was something like this

export class ThemeControllerService {


  private theme: ThemeModel = {
    Color60Bold: "#dae0f1",
    Color60Normal: "#dae0f1",
    Color60Fade: "#dae0f1",
    Color30Bold: "#8160a9",
    Color30Normal: "#8160a9",
    Color30Fade: "#8160a9",
    Color10Bold: "#5166b0",
    Color10Normal: "#5166b0",
    Color10Fade: "#5166b0"
  };

  GetTheme(): ThemeModel
  {
    return this.theme;
  }

  constructor() { }

}

Then I defined this service as a variable in the components that I wanted to use the colors.

and i style my element colors like this

<h3 [style.color]="theme.Color10Fade">2018/04/26</h3>

instead of

h3{
color: #5166b0;
}

After this,my problem solved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alfred