diff --git a/ResponsiveImages.html b/ResponsiveImages.html index f3095301..50aa73f0 100644 --- a/ResponsiveImages.html +++ b/ResponsiveImages.html @@ -60,16 +60,36 @@
Through the combination of a new picture
element and a new the srcset
attribute for the existing source
element, this specification adds functionality to HTML that allows authors to list a range of images which may be suitable for a range of device capabilities and different usage scenarios. The ability to adapt content to the constraints and capabilities of devices and different usage scenarios is commonly referred to as "responsive design".
This allows user agents to be more responsive to a wide spectrum of browsing scenarios, ranging from simple mobile devices to desktop browsers scenarios, when selecting which image resources to download and display for an end-user. This includes, but is not limited to, the selection of images most suited for either high or low density displays and screen resolutions on range of devices, are well as responsive selection of images based on printer's dpi and color reproduction capabilities.
The overarching goal is to give developers a way to provide user agents with sufficient information about each image, and applicable media, so that the user agent can select the most appropriate one for a dynamically changing browsing situations. This includes, but is not limited to, different screen pixel width/height, pixel densities, environmental lighting conditions, and potentially even situations where the network bandwith changes dymamically. By providing a graded set of image sources, UA discretion could similarly apply to situations where the network bandwith changes dymamically. Based on user settings and network latency calculated by the user agent, the UA may have the option of selecting lower density image sources.
+In addition, this proposal is being worked on with the following goals in mind:
+img
element - and we may even be able to do better! This document was proposed by the Responsive Images Community Group as a solution to bug 18384.
This specification describes the conformance criteria for user agents (relevant to implementors) and documents (relevant to authors and authoring tool implementors).
Implementations that use ECMAScript to expose the APIs defined in this specification MUST implement them in a manner consistent with the ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]].
The following terms are used throughout this specification so they are gathered here for the readers convenience. The following list of terms is not exhaustive; other terms are defined throughout this specification.
The follow terms are defined by the [[!HTML5]] specification: img
element, source
element, media
resource, fallback content, valid non-empty URL potentially surrounded by spaces and valid media query.
The image-set notation microsyntax is defined by the CSS Image Values and Replaced Content Module Level 4 Specification [[!CSS4-IMAGES]].
@@ -96,14 +116,21 @@picture
elementwidth
height
HTMLImageElement
.[NamedConstructor=Picture, + NamedConstructor=Picture(unsigned long width), + NamedConstructor=Picture(unsigned long width, unsigned long height)] +HTMLPictureElement : HTMLImageElement{ + readonly attribute DOMString media; +}+ +
The picture
element used for displaying an image that can come from a range of sources (see srcset
attribute). Which image the user agent displays depends on the
algorithm for deriving the source image.
The chosen image is the embedded content.
-The crossorigin
attribute is a CORS settings attribute. Its purpose is to allow images from third-party sites that allow cross-origin access to be used with canvas.
The width and height attributes represent the dimensions of the visual content of the element (the width and height respectively, relative to the nominal direction of the output medium), in CSS pixels. They are in every way the same as those of an img
element. The value of attributes, if specified, are valid non-negative integers.
For user agents that don't support the picture
element, an author can provide an img
element as fallback content. User agents SHOULD NOT show this content to the user: it is intended for legacy user agents that do not support picture
, so that a legacy img
element can be shown instead.
On getting the media
attribute, the user agent MUST return the
The chosen image is the embedded content.
+For user agents that don't support the picture
element, an author can provide an img
element as fallback content. User agents SHOULD NOT show this content to the user: it is intended for legacy user agents that do not support picture
, so that a legacy img
element can be shown instead.
Authoring requirement: as with the img
element, documents must not use the picture
element as a layout tool. In particular, picture elements should not be used to display transparent images, as they rarely convey meaning and rarely add anything useful to the document.
Sample picture element markup:
@@ -204,6 +231,7 @@The overarching goal is to give developers a way to provide user agents with sufficient information about each image, and applicable media, so that the user agent can select the most appropriate one for a dynamically changing browsing situations. This includes, but is not limited to, different screen pixel width/height, pixel densities, environmental lighting conditions, and potentially even situations where the network bandwith changes dymamically. By providing a graded set of image sources, UA discretion could similarly apply to situations where the network bandwith changes dymamically. Based on user settings and network latency calculated by the user agent, the UA may have the option of selecting lower density image sources.
@@ -224,6 +252,10 @@There are many use cases that are supported as listed below. There are two primary use cases:
...
+ +TODO: add thanks