- From: Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com>
- Date: Wed, 28 Aug 2013 17:12:57 +0200
- To: Rune Lillesveen <rune@opera.com>
- Cc: www-style list <www-style@w3.org>, Peter Beverloo <peter@chromium.org>, Hugo Parente Lima <hugo.lima@openbossa.org>, Ojan Vafai <ojan@chromium.org>, John Mellor <johnme@chromium.org>, "Kostiainen, Anssi" <anssi.kostiainen@intel.com>
Hi there Rune, On Mon, Aug 26, 2013 at 1:49 PM, Rune Lillesveen <rune@opera.com> wrote: > On Wed, May 9, 2012 at 12:49 PM, Kenneth Rohde Christiansen > <kenneth.christiansen@gmail.com> wrote: >> Hi there, > > Hi, resurrecting this thread. Great! >> 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) > > I've tried to twist my brain around this and I think a prioritization > makes sense. Currently, the spec says that meta viewport elements are > cascaded together with @viewport rules. It probably makes more sense > with a prioritization where meta viewport rules, and other legacy > tags, are dropped in the presence of @viewport rules in a UA > supporting @viewport. Otherwise there will be an unpredictable mix of > descriptors from the various legacy tags and the @viewport descriptors > depending on which of the legacy tags are supported in a given UA. I have the same feeling. If the web site has @viewport and a viewport meta, the latter is probably there to handle browsers not supporting @viewport and site author doesn't intent the two to interact, which might force the author to resort to browser sniffing instead :-( > > I think the XHTML-MP doctype should be an expection, though. I agree that it is an exception. > XHTML-MP > doctype should affect the _UA_ styles. XHTML-MP documents is not a > legacy tag in the same sense, and a UA that implements only @viewport > would still have separate UA styles which don't have the @viewport { > min-width: 980px } as the HTML/HTML5 documents would have. > > The legacy tags should be on the author level of the cascade, though. > > So, the cascade would be something like this: > > 1. UA stylesheets (different @viewport for HTML and XHTML-MP) > 2. User stylesheets Should the user be able to overwrite differently for HTML and XHTML-MP? > 3. Author style - only one of the sources below picked for the > cascading. Based on presence - listed in increasing priority. > 3.1. HandheldFriendly > 3.2. MobileOptimized > 3.3. Meta Viewport (The 980px default width behavior should be on the > author level here before adding meta tags instead of having it at UA > level as mentioned in Section 11 of css-device-adapt) > 3.4. @viewport > > I do agree that the legacy handling doesn't belong in the > css-device-adapt spec. It's there for historical reasons and the fact > that it's easier to keep it up-to-date with changes in @viewport > descriptors while the spec evolves. I'm fine with moving legacy tag > handling into HTML as normative. Fine with me too, but maybe later when the spec is more stable? and this has implementations? Cheers Kenneth >> 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 > > -- > Rune Lillesveen -- Kenneth Rohde Christiansen Senior Engineer, WebKit, Qt, EFL Phone +45 4294 9458 / E-mail kenneth at webkit.org ﹆﹆﹆
Received on Wednesday, 28 August 2013 15:13:24 UTC