I'm create simple ionic 4 app, and i'm use some css for android as well as ios. now when i'm build ios, android css conflicted. i want to if/else condition in css based on build type ?
1 Answer
There is no need to write if-else for switching between css classes for platform-specific css.
There is method in ionic 4 for platform-specific css's.
for android platform write your css like this :
md because android, as well as other, platforms, use material design by default.
.md .sample {}
and while using IOS platform :
.ios .sample {}
here are docs for more info.
2 Comments
gausmohammad shaikh
Thank you sir,You are great.
NickCoder
glad to help! :-)