Css variables are not effective in devices?


I tried to test my app on devices using physical device and virtual devices. For me, I found two major problems:

1.Overlays like menu ,alert,action sheet,etc, not working. and looks like it’s due to animation problem in different android version.

  1. Css variables.
    I tried to use css variables in component styles and global.css. like:
    in component styles:


in global.css:

my-tag ion-toolbar{

either one of those two ways works in browser. but in devices(some versions like below android 6), only the latter way works.

I think the animation and css variables problems are all related to webview versions, am I right?

Is ther anybody can help me? I want to support at least android 5.

here’s my ionic info:


Ionic CLI : 5.4.2 (C:\Users\TuDouT440P\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.11.1
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0


Cordova CLI : not installed
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 5 other plugins)


cordova-res : not installed
native-run : 0.2.8


Android SDK Tools : 26.1.1 (C:\DevProgram\android-sdk-windows)
NodeJS : v10.15.1 (C:\DevProgram\nodejs\node.exe)
npm : 6.8.0
OS : Windows 7