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 ...

Get Learning Ionic - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.