The English version of this specification is the only normative version. Non-normative translations may also be available. Please refer to the errata for this document, which may include some normative corrections.
Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This specification defines a media feature to match the different visual presentation modes that can be applied to web applications and thereby apply different styling based on these different modes using CSS Media Queries [MEDIAQ].
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 https://www.w3.org/TR/.
This specification is obsolete and should no longer be used as a basis for implementation.
The Widget specifications became W3C Recommendations in 2012-2013. They were designed to enable interactive single purpose application for displaying and/or updating local data or data on the Web, packaged in a way to allow a single download and installation on a user's machine or mobile device.
Since 2013, Widgets has had limited deployment and its usage has been reduced since then. Service Workers and Web App Manifest are considered to provide better solutions nowadays.
For purposes of the W3C Patent Policy this Obsolete Recommendation has the same status as an active Recommendation; it retains licensing commitments and remains available as a reference for old implementations but is no longer recommended for future implementation.
This section is non-normative.
Web applications, be they widgets or in-browser, can on most platforms be run in multiple visual modes. At times they may occupy the entire screen, at others they may be minimized to a specific docking area; at times they may have chrome that matches the operating system's style while at others they may be providing their own controls in order to provide for a more immersive experience.
The user is generally in control of at least several aspects of these modalities, and it is therefore important for authors to be able to react to these in order to provide different styling to their applications. In order to achieve this, this specification defines a media feature that allows different CSS style rules to be applied depending on whether a given media query [MEDIAQ] matches.
This section is non-normative.
The design goals and requirements for this specification are documented in the Requirements for Standardizing Widgets [WIDGETS-REQS].
This document addresses one requirement from "User Experience":
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words must, must not, required, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC2119].
This specification defines conformance criteria that apply to a single product: user agents that implement the view modes that it contains.
An application could be designed to trick users into performing actions they do not wish to or to capture data that they did not intend to provide. Examples of situations in which the user could be tricked include, but are not limited to:
Implementers are encouraged to take these issues into consideration and to provide limitations to what a Web application may do in order to ensure that the user is exposed to minimal risk.
'view-mode'
media featureThe view-mode media feature describes the mode in which the Web application is being shown as a running application on the platform.
A user agent should make a best-effort attempt at matching the great variety of platform conventions in which it may be running a Web application to the list of view modes defined in this specification so that the view-mode media feature may describe common situations in a manner that is useful to authors. Each view mode is defined to be exclusive of the others.
The view-mode media feature accepts the following enumerated values:
A simple example in CSS:
@media handheld and (view-mode: floating) and (orientation: landscape) { // ... } @media tv and (view-mode: windowed) { // ... } @media handheld and (view-mode: fullscreen) { // ... }
This section is non-normative.
Daniel Herzog, Arve Bersvendsen, Arthur Barstow, Jochen Cichon, Sebastian Markbåge, Cameron McCormack, David Rogers, Richard Tibbett, Scott Wilson, Boris Zbarsky, Kenneth Christiansen, Daniel Glazman, Tab Atkins Jr, Josh Soref, Marcin Hanclik, the CSS WG.