W3C home > Mailing lists > Public > www-style@w3.org > July 2010

RE: [CSS21] Issue 149 - px vs. pt

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Thu, 1 Jul 2010 05:03:45 +0000
To: "robert@ocallahan.org" <robert@ocallahan.org>
CC: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <045A765940533D4CA4933A4A7E32597E214F9FAC@TK5EX14MBXC120.redmond.corp.microsoft.com>
There effectively are different viewports today. On an iPhone, a web page is told it renders on a viewport much larger than it physically is. That 1”
may turn into 1/10 of an inch until I zoom it up.

But other pages are targeted for the iPhone and claim the viewport so that a 1” length turns into a real inch. I don’t think that’s unique to the iPhone
either. Other browsers tell web pages they have a larger viewport than what’s there but also have a widget or app mode where the app takes over
 the viewport and is told the ‘truth’ about its dimensions.

Given this, if my home page has a stylesheet with a media query for (min-width: 254truemm) and another for (min-width:19”), what happens ? Should
they both match ?

From: rocallahan@gmail.com [mailto:rocallahan@gmail.com] On Behalf Of Robert O'Callahan
Sent: Wednesday, June 30, 2010 9:47 PM
To: Sylvain Galineau
Cc: fantasai; www-style@w3.org
Subject: Re: [CSS21] Issue 149 - px vs. pt

On Thu, Jul 1, 2010 at 12:51 PM, Sylvain Galineau <sylvaing@microsoft.com<mailto:sylvaing@microsoft.com>> wrote:
The UA needs a clue from the author to figure out whether:
- The content can be rendered on a virtual viewport that looks 19" to the app (as on, say, an iPhone-type browser)
- The content should be rendered on the 'real' viewport where 1" square means 1" square of the screen's physical surface

Which implies you'd know which kind of viewport you're rendering to in order to evaluate the truemm media query for a match,
right ?

I don't understand the question. There aren't different kinds of viewports here, just different units for measuring the viewport.

If the author wants to render a 1" square on the screen's physical surface, use 25.4truemm. If the author wants to render a 1" square when printed, and some usable analogue of that for other media, use 1in.

If the author wants to apply certain style rules when the output device is wide enough for 10 1" squares on the screen's physical surface, use @media screen (min-width: 254truemm) { ... }. If the author wants to apply certain style rules when the output device is wide enough for 10 1" printed squares, and 10 "1in" squares for other media, use @media screen (min-width: 10in) { ... }.

"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]
Received on Thursday, 1 July 2010 05:04:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:48 UTC