Aspect ratio Media query for nexus 6

3.1k Views Asked by At

I have tried to find media query (aspect ratio Media query for nexus 6). but did't find anywhere. if anyone can help me in this matter then let me know.

i also tried to create ratio according to width/height by using this link (http://andrew.hedges.name/experiments/aspect_ratio/) but it's not working for me.

Thanks in advance.

2

There are 2 best solutions below

3
On

Since you want the aspect ratio, you just write the dimensions of it like this: @media screen and (device-aspect-ratio: 435/773) { }

1
On

Someone asking a semi-related question at https://codereview.stackexchange.com/questions/74915/reducing-media-queries seems to have used this:

/* Motorola Nexus 6 (portrait and landscape) */
@media only screen and (min-device-width : 1440px) and
(max-device-width : 2560px) and (-webkit-min-device-pixel-ratio : 3.5) {
html {
    font-size: 200%;
    }
}