Re: Proposal: Form factor media queries

Tab Atkins Jr.:
> On Sat, Dec 10, 2011 at 4:36 AM, Christoph Päper
>> 
>> … the device and display width and height queries would work just fine with physical units (…) if they’re not affected by the fixed 96px = 72pt (…) ratio required elsewhere (…).
> 
> They work the same, with the fixed ratio.  Anything else would be *ridiculously* confusing.

Here’s a popular example, Apple’s 3:2 “3½ inch” mobile screens:

         w        h       A        d
  phys. 50mm  ×  75mm  = 38cm² ⇒ 90mm = 3.5in
         x        y         r            q
  old  320dot × 480dot ⇒ 163dot/in ⇒ [1.7dot/px] = …
  new  640dot × 960dot ⇒ 326dot/in ⇒ [3.4dot/px] = …
  CSS                      96px/in ↗
       q’           a       b      w’     h’     A’      d’
  old  2dot/px ⇒ 160px × 240px ⇒ 42mm × 64mm = 27cm² ⇒ 3in
  new  3dot/px ⇒ 213px × 320px ⇒ 56mm × 85mm = 48cm² ⇒ 4in

How is it less confusing that, if iOS Webkit applies CSS rules correctly, the same physical screen dimensions can vary that much when queried via CSS “physical” units?

  48/38 = 127%   38/48 =  78%     4/3.5 = 114%   3.5/4 =  88%
  27/38 =  72%   38/27 = 140%     3/3.5 =  86%   3.5/3 = 117%
  27/48 =  56%   48/27 = 178%     3/4   =  75%     4/3 = 133%

Received on Tuesday, 20 December 2011 10:13:41 UTC