poptag poptag - 5 months ago 28
CSS Question

Difference between aspect-ratio and device-aspect-ratio in CSS media queries

What is the difference in simple terms between

aspect-ratio
and
device-aspect-ratio
?

Answer

aspect-ratio

Describes the aspect ratio of the targeted display area of the output device. This value consists of two positive integers separated by a slash ("/") character. This represents the number of horizontal pixels over the number of vertical pixels.

Source.

device-aspect-ratio

Describes the aspect ratio of the output device. This value consists of two positive integers separated by a slash ("/") character. This represents the number of horizontal pixels over the number of vertical pixels.

Source.

Comments