Custom css per device (screen size)?


#1

My application needs to support smaller device sizes along with the big ones. So, in some cases the layout needs to change based on the screen size. Is it possible to target different device sizes with css or javascript? What is the ionic best practice here?


#2

I’m doing it with media queries for now, waiting to see if the Ionic team has thought of some kind of responsive classes. I found some breakpoints they are already using with the Chrome dev tools (at 340px, 567px, 767px and 1023px) so I’m trying to stick to the media queries they already defined to avoid problems.

If you find something better, please let me know! :slight_smile:


#3

Thanks, I’ll try that.


#4

You could check the topic below (it’s a bit old, still it might help you):