0

Well, it's similar to My iPhone 6 gets the iPhone 5 media query ques, but I am still unable to figure out the answer.

I have a CSS written in Iphone 5/SE media query as below :

'@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-device-pixel-ratio: 2)' : {
    shippingPrice : {
        fontSize : '12px',
        width : '29%'
    }
}

The same CSS is getting applied for Iphone 6/7/8 devices as well. I am using CSS in JS.

Shantanu Tomar
  • 1,572
  • 7
  • 38
  • 64
  • try using `min-width` instead of `min-device-width` and why are there single quotes at the beginning of the query? – Halnex Jul 13 '19 at 14:31
  • @Halnex I put (device-aspect-ratio: 40/71) at the end and it worked for me. Thanks for the suggestion. Single quotes are required for CSS in JS syntax as this is not in CSS file. – Shantanu Tomar Jul 14 '19 at 03:47

0 Answers0