How can i different iphone 5, iphone 6 and iphone 6+ in styles?


#1

Are there any classes that would separately write styles for iPhone 5, 6 and 6+?


#2

Hi,
You can try with media queries:


#3

You could use the cordova device API to get information about the device being used, then set css classes using that information


#4

Ionic’s ionic.Platform adds classes for ios and versions. ios8_4 for example. You could target those rather than adding your own means.


#5

Where can I find a list of all the classes set by Ionic? I searched in the docs and didn’t find anything, also googled and only found some responses in this forum and in stackoverflow.


#6

Documentation doesn’t cover the classes unfortunately. But what you can do in Chrome Dev tools is emulate the different devices and examine the classes on the document body set by Ionic Platform.


#7

Ok, so I’ve documented the platform classes and think the most relevant section for you is https://github.com/delta98/ionic-platform-body-classes#platform-os-version-classes


#8

Awesome! Thank you @delta98!


#9

@delta98 thank you!
It is what is needed


#10

No problem, don’t forget to share it with others.