Media query tests - aspect-ratio

Back to index.

CSS 3 spec | CSS4 spec

The aspect-ratio media query gives the aspect ratio of the layout viewport; on desktop this is the browser screen.

Note that in some mobile browsers this ratio changes when the toolbar scrolls out of or into view.

Basic

Equality

Note that this test will only work at the moment you load the page. If you change the page dimensions in any way the test fails. Reload this page to redo the test with other page dimensions.

Units

Values