How To Write Scss Only For Ios Device In Ionic 3, Ionic 4, Ionic 5

How To Write Scss Only For ios Device In Ionic 3, ionic 4, ionic 5

Ionic provides platform-specific styles based on the device the application is running on. Styling the components to match the device guidelines allows the application to be written once but look and feel native to the user depending on where it is accessed.

on the Html tag, it automatically adds a class according to device example if you are running an app in the android device it will ad “MD” or if you using ios then it will add a class “ios” on HTML tag and many of parents elements.

In android device

<html class="md">

 

In ios device

<html class="ios">

 

Platform Mode Description
ios ios Viewing on an iPhone, iPad, or iPod will use the iOS styles.
android md Viewing on any Android device will use the Material Design styles.
core md Any platform that doesn’t fit any of the above platforms will use the Material Design styles.