W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: User Agents Do Not Implement Absolute Length Units, Places Responsive Design in Jeopardy

From: Brian Blakely <anewpage.media@gmail.com>
Date: Thu, 20 Oct 2011 12:14:36 -0400
Message-ID: <CAJGQg4FgMBh=BpMKue-hgzz_OfT9i2i-j8b+Rxt7L6Cpyd5r5g@mail.gmail.com>
To: www-style@w3.org
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>
The solution to this problem is possibly tied to the @supports

I suggest that any @supports test which includes physical units evaluate
false (true for the "not" keyword) when physical units are in a fixed ratio
to pixels and, hence, not actually representative of their units to the

*Example (physical units not actually supported)*
@supports (height: 3in) /* false */
@supports not (height: 1cm) /* true */

This approach preserves backwards compatibility.  It works best if @supports
and @media can be used together (I am actually unsure).

*Example (@supports + @media)*
@supports (max-width: 4.5in) {

@media (max-width: 4.5in) {

/* reliable mobile styles */


@supports not (max-width: 4.5in) {


 Galaxy Nexus mobile device in portrait orientation,
unless it pixel-doubles like iPhone.


@media (max-width: 720px) {


 mobile styles, hopefully desktops or tablets
don't get caught in that. :/





On Wed, Oct 5, 2011 at 10:17 AM, Brian Blakely <anewpage.media@gmail.com>wrote:

> See spec for a refresh: http://www.w3.org/TR/css3-values/#absolute-lengths
> As far as I know, UAs have never actually implemented this, but always
> pretended to anyway.  If you size something as "1in", you're more than
> likely going to get 90px, regardless of the accuracy of this output.
> This is important because physical screen dimensions are going to become
> very crucial in the near-term for content and layout delivery, especially in
> regards to Media Queries.
> The problem which was years away is now an impending reality: the day when 720p+
> mobile devices<http://www.engadget.com/2011/09/26/samsung-announces-galaxy-s-ii-lte-and-galaxy-s-ii-hd-lte-handset/>become the norm.  Unless these devices are all pixel-doubling and
> -quadrupling without exception, using Media Queries for the most common
> responsive design practice — horizontal resolution detection in pixels —
> won't work anymore.  They will simply cease to be a solution, leaving no
> replacement.
> We need a new way to do generic device detection, or we need absolute
> length units to work.
> Anyone from representative groups (Mozilla, Chrome Team, Apple) want to
> comment?  Does the spec need to be changed?
> Best,
> -Brian
Received on Thursday, 20 October 2011 16:15:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:06 UTC