W3C home > Mailing lists > Public > www-style@w3.org > May 2012

CSS Device Adaptation and legacy meta tags and doctypes

From: Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com>
Date: Wed, 9 May 2012 12:49:44 +0200
Message-ID: <CAEC208vnjme5RaUBFdx0aS-8LNawiPKCdXZBh2LsByc1weoqog@mail.gmail.com>
To: www-style list <www-style@w3.org>
Cc: Peter Beverloo <peter@chromium.org>, Hugo Parente Lima <hugo.lima@openbossa.org>, Ojan Vafai <ojan@chromium.org>, johnme@chromium.org
Hi there,

Following a discussion on webkit-dev [1], we would like to have added
a nomative section in the CSS Device Adaptation spec [2], specifying
how to handle legacy viewport tags, such as HandheldFriendly.

The spec already briefly talks about XHTML-MP in the following:

"Certain DOCTYPEs (for instance XHTML Mobile Profile) are used to recognize
mobile documents which are assumed to be designed for handheld devices, hence
using the viewport size as the initial containing block size."

The Nokia N9 browser, WP7 Internet Explorer and Android already
implement such support. And testing shows that iOS at least does
similar things for XHTML-MP.

The IE team even has a blog post explaining how it works [3]

Basically there is a priority:

XHTML-MP doctype (overrides default configuration)
HandheldFriendly meta tag (overrides XHTML-MP doctype)
MobileOptimized (overrides HandheldFriendly, etc)
viewport (overrides MobileOptimized etc)

The XHTML-MP doctype would correspond to the following viewport meta
tag: <meta name="viewport" content="width=device-width,
height=device-height, initial-scale=1">

The same counts for HandheldFriendly (and MobileOptimized, in the case
the content attribute is missing or not parseable)

Else <meta name="MobileOptimized" content="320"> would to correspond
to  <meta name="viewport" content="width=320, initial-scale=1">


[1] http://thread.gmane.org/gmane.os.opendarwin.webkit.devel/20536
[2] http://www.w3.org/TR/css-device-adapt/
[3] http://blogs.msdn.com/b/iemobile/archive/2010/11/22/the-ie-mobile-viewport-on-windows-phone-7.aspx

Kenneth Rohde Christiansen
Senior Engineer
Nokia Mobile Phones, Browser / WebKit team
Phone  +45 4093 0598 / E-mail kenneth at webkit.org

http://codeposts.blogspot.com ﹆﹆﹆
Received on Wednesday, 9 May 2012 10:50:39 UTC

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