Platform-level overrides
Now that we have seen how to apply styles at page level, let us see how Ionic theming makes it so simple to manage styles at platform level. Platform-level styles are applicable when the same app is viewed in multiple devices, which have their own distinct styles.
While working with Ionic, we define modes, where a mode is the platform in which the app is running. By default, Ionic adds a class name, which is the same as the mode on the ion-app element. For instance, if we are viewing the app on Android, the body will have a class named md, where md stands for material design.
To quickly check this out, we will open http://localhost:8100/?ionicplatform=ios and then inspect the body element in the developer tools. We ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access