0

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you sir,You are great.
glad to help! :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.