Widgets 1.0: View Modes Media Feature

W3C Working Draft 6 October 2009

This version:
Latest version:
Latest Editor's draft:
Marcin Hanclik, ACCESS Co., Ltd.
Robin Berjon, Vodafone
Arve Bersvendsen, Opera Software ASA
Marcos Cáceres, Opera Software ASA


This specification defines a media feature and visual presentation modes of the document. Multiple view modes are specified that allow for accomodation of various content presentation use cases. This document builds upon the Media Queries [MediaQueries] and Widgets-Packaging [Widgets-Packaging] specifications.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is the First Public Working Draft of the Widgets 1.0: View Modes Media Feature specification for review by W3C members and other interested parties.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is produced by the Web Applications WG, part of the Rich Web Clients Activity in the W3C Interaction Domain. It is expected that this document will progress along the W3C's Recommendation track. Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

You can find the latest Editor's Draft of this document in the W3C's CVS repository, which is updated on a very regular basis. The public is encouraged to send comments to the WebApps Working Group's public mailing list public-webapps@w3.org (archive). See W3C mailing list and archive usage guidelines. A detailed list of changes from the previous version is also available from the W3C's CVS server.

Implementers should be aware that this document is not stable. Implementers who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways. Vendors interested in implementing this document before it eventually reaches the Candidate Recommendation stage should join the aforementioned mailing lists and take part in the discussions.

User agents that wish to extend this specification in any way are encouraged to discuss their extensions on a public forum, such as public-webapps, so their extensions can be considered for standardization.

Table of Contents

1. Introduction

This section is non-normative.

This specification defines new media feature and its values that point to the combination of the document presentation's properties. The properties allow for the detailed specification of the user interface elements that influence the perception of the document's content in any given presentation mode. The behaviour expected from the conforming user agent is also provided in this specification.

1.1. Design goals and requirements

This section is non-normative.

The design goals and requirements for this specification are provided in the Widgets 1.0 Requirements [Widgets-Reqs] document.

This document addresses the following requirements:

  1. Display modes : see Presentation properties.
  2. Display mode switching : see Presentation properties and switching mechanim based on [Media Queries].
  3. Preferred display mode : see floating view mode as the default mode.

1.2. The Widget Family of Specifications

This section is non-normative.

This specification is part of the Widgets 1.0 family of specifications. The list of specifications that make up the Widgets 1.0 Family of Specifications can be found on the Working Group's wiki.

1.3. Typographic Conventions

This section is non-normative.

This section defines the following typographic conventions used by this specification:

The following are a few samples of the usage of the typographic conventions in this document:

This is an example. Examples are used to explain concepts or demonstrate how to use a feature. Examples are non-normative.

ISSUE: This is an issue. It implies something that Working Group is trying to fix. Eventually, all these will disappear from the spec. Issues are non-normative.

Note: This is a note, it usually contains useful supplementary information in a non-normative form.

1.4. Definitions

View mode

The view mode is the document's visual presentation described by the properties outlined in this specification.


The chrome encompases the visible parts of the user agent that do not depend on the content being rendered, such as minimize, restore/maximize, and close buttons in addition to adjacent items, such as title bars, toolbars, dialog boxes and resize handlers, that are rendered outside of the viewport.

Media feature

The term media feature is defined in [Media Queries] specification.


The term widget is defined in [Widgets-Packaging] specification.

User agent

A user agent is an implementation of this specification.


A CSS viewport. In case of the continuous media, as defined in the [CSS21] specification, a viewport is the area on which the Document is rendered by the user agent. The dimensions of the viewport exclude the user interface chrome and scrollbars.

2. Conformance

All examples and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.

The key words must, must not, required, should, should not, recommended, may and optional in the normative parts of this document are to be interpreted as described in [RFC2119].

3. 'view-mode' media feature

The view-mode media feature is the representation of the view mode based on CSS media feature.

3.1 View modes

The following values of the view-mode feature are defined in this specification.


The application value represents a widget that must run in an application-like mode, where the widget is, if applicable, given chrome constructs. When running in this mode, widgets must not explicitly control window sizes or any such attempt must have no effect.


The floating value describes a widget that uses a chromeless window. This is the default presentation mode for a widget. How this is presented to the end-user is dependant on the user agent, the screen size, its resolution and on the media type. In this mode the viewport must be rendered transparently with respect to the background.


The fullscreen value represents a widget that runs in the full-screen mode. When rendered in this mode the widget must occupy the whole screen area and must not display any chrome.


The mini value describes a widget running in a docked mode, which is typically a limited area into which the content is rendered. The widget must not have any chrome constructs when rendered in this mode.

In this mode no input events must be dispatched to the document.


The all value is defined to describe a widget for which it is irrelevant how it is displayed. The presentation of the widget is fully dependant on the user agent. This value does not define any actual presentation mode of a widget.

This value is to be used to override the default presentation mode set to floating that would be applied if no value is specified in the document.

3.2 Presentation properties

The following properties describe the user interface functionalities that influence the perception of the document's content important from this specification's point of view.

whether the user agent's chrome is visible.
whether the user agent renders the view port with (CSS-equivalent) opacity zero with respect to the background or application environment.
which value of the CSS overflow property is used for the viewport. The property specified in the table below must not be overriden by the document's CSS.
size control
whether the size is controlled by the user agent or by the widget.
whether the events are fired on the document and whether the input elements are active.
initial width and height
how the values of the width and height attributes of the <widget> element are handled.

The following table defines each of the view-modes' values in terms of its properties.

'view-mode' value chrome transparency overflow size control interactivity initial width and height
application yes no auto dependent on widget or user agent yes used as initial width and height of the rendering area, excluding chrome. The actual width and height may be overidden by the user agent.
floating no yes hidden dependent on widget yes used as initial width and height of the rendering area
fullscreen no yes/no auto dependent on user agent yes ignored
mini no yes/no hidden dependent on user agent no ignored

3.3 Examples

@media handheld and (view-mode: floating) and (orientation: landscape) {

@media tv and (view-mode: application) {

@media handheld and (view-mode: fullscreen) {

@media handheld and (view-mode: mini) {


The editors would like to thank the following people for their contributions to this specification:

Arthur Barstow, Sebastian Markbåge, Cameron McCormack, Richard Tibbett, Scott Wilson, Boris Zbarsky.

Change log

To be done after FPWD.

Normative References

[Media Queries]
Media Queries, H. Wium Lie, T. Çelik, D. Glazman, A. van Kesteren. W3C Candidate Recommendation 23 April 2009.
Key words for use in RFCs to Indicate Requirement Levels, RFC2119, S. Bradner. March 1997.

Informative References

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification, B. Bos, I. Hickson, T. Çelik, H. Wium Lie. W3C Candidate Recommendation 23 April 2009.
Widgets 1.0: Packaging and Configuration, M. Cáceres. W3C Candidate Recommendation 23 July 2009.
Widgets 1.0 Requirements, M. Cáceres and M. Priestley. W3C Working Draft, 30 April 2009 (Work in progress).