Re: [mediaqueries4] Media queries for multichannel audio ?

On Wed, 20 Mar 2013 16:09:02 +0100, Kenneth Rohde Christiansen  
<kenneth.r.christiansen@intel.com> wrote:

> WebKit has devicePixelRatio so you can device the device size by using
> that. Something to query that should probably be standardized, but
> media queries are not exactly for querying exact values.

Something has been standardized, actually:

http://www.w3.org/TR/css3-mediaqueries/#resolution

The following:

   @media (min-resolution: 2dppx) { ... }

is completely equivalent to:

   @media (min-device-pixel-ratio: 2) { ... }

if the dppx unit is not available, you can get the exact same result (if a  
bit less author friendly) with

@media (min-resolution: 192dpi) { ... }

The dppx / dpcm / dpi units are defined in terms of device pixel per CSS  
px / CSS cm / CSS inch, so that it would work.

  - Florian

Received on Thursday, 21 March 2013 20:23:42 UTC