• Resolved johannes999

    (@johannes999)


    hello,
    I see that The:

    -webkit-device-pixel-ratio is a non-standard Boolean CSS media feature which is an alternative to the standard resolution media feature. Note: This media feature is a WebKit feature. If possible, use the resolution media feature query instead.1.

    I have this media qyery:

    
    @media  screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2)
     
     { 
    }
    

    my question is do I have to use webkit-device-pixel-ratio in my media queries or ignore it?
    if yes why?
    if no why?

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ignore it because it is browser specific and the Note tells you not to use it. There is no CSS that you would need in a media query for that specific ratio.

    Thread Starter johannes999

    (@johannes999)

    thank you very much.

    I forgot to ask using 2 media queries for each device resolution:

    orientation : portrait or landscape seperatly make a sense or ignore it too.
    thanks

    If your design is detailed enough to need more CSS for those breakpoints, use them, but mostly there is no need.
    Also, does every device have an orientation? Does a laptop have one? How about a 4K monitor?

    Thread Starter johannes999

    (@johannes999)

    thank you
    johannes

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘general question about webkit device pixel ratio?’ is closed to new replies.