Skip to content

Commit bf69369

Browse files
author
Marcos Caceres
committed
Commiting before removing a bunch of attributes from the picture element
1 parent d6ddb83 commit bf69369

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

ResponsiveImages.html

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<!DOCTYPE html>
2-
<!-- saved from url=(0014)about:internet -->
32
<html>
43
<head>
54
<title>HTML Responsive Images Extension</title>
@@ -38,6 +37,8 @@
3837
#conformance dd {margin-bottom: 1em; }
3938
pre { tab-size: 3; /* Reduce indentation. */ }
4039
.informative-subhed { font-size: 120%; }
40+
41+
/* WYSIWYG help, so I can see what I've linked to ... yes, I use a WYSIWYG editor... stop laughing at me :) */
4142
a{
4243
color: blue;
4344
}
@@ -57,26 +58,23 @@
5758

5859
<section id="intro" class="informative">
5960
<h1>Introduction</h1>
60-
<p>This proposal allows content authors to provide user agents with the information they need to select the best image source.
61-
62-
<!-- / goals --> </p>
61+
<p>This proposal allows content authors to provide user agents with the information they need to select the best image source. </p>
6362
</section>
64-
<!-- / introduction -->
65-
63+
6664
<section id="conformance">
6765
<p>This specification describes the conformance criteria for <dfn title="user agent">user agents</dfn> (relevant to implementors) and <dfn title="document">documents</dfn> (relevant to authors and authoring tool implementors).</p>
68-
<p>Implementations that use ECMAScript to expose the APIs defined in this specification MUST implement them in a manner consistent with
69-
the ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]].</p>
70-
<section id="dependencies">
66+
<p>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]].</p>
67+
68+
<section id="definitions">
7169
<h3>Definitions</h3>
72-
<p>The <dfn><a href="http://www.w3.org/TR/html5/the-img-element.html#the-img-element">img element</a></dfn>,
73-
<dfn><a href="http://www.w3.org/TR/html5/the-source-element.html#the-source-element">source element</a></dfn>,
74-
<dfn><a href="http://www.w3.org/TR/html5/media-elements.html#media-resource">media resource</a></dfn>,
70+
<p>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.</p>
71+
<p>The follow terms are defined by the<cite> </cite>[[!HTML5]] specification: <dfn><a href="http://www.w3.org/TR/html5/the-img-element.html#the-img-element"><code>img</code> element</a></dfn>,
72+
<dfn><a href="http://www.w3.org/TR/html5/the-source-element.html#the-source-element"><code>source</code> element</a></dfn>,
73+
<dfn><a href="http://www.w3.org/TR/html5/media-elements.html#media-resource"><code>media</code> resource</a></dfn>,
7574
<dfn><a href="http://www.w3.org/TR/html5/media-elements.html#concept-media-load-algorithm">resource selection algorithm</a></dfn>,
7675
<dfn><a href="http://www.w3.org/TR/html5/content-models.html#fallback-content">fallback content</a></dfn>,
7776
<dfn><a href="http://www.w3.org/TR/html5/urls.html#valid-non-empty-url-potentially-surrounded-by-spaces">valid non-empty URL potentially surrounded by spaces</a></dfn>
78-
and <dfn><a href="http://www.w3.org/TR/html5/common-microsyntaxes.html#valid-media-query">valid media query</a></dfn>
79-
are defined by the<cite> </cite>[[!HTML5]] specification.</p>
77+
and <dfn><a href="http://www.w3.org/TR/html5/common-microsyntaxes.html#valid-media-query">valid media query</a></dfn>.</p>
8078
<p>The term <dfn><a href="http://tools.ietf.org/html/rfc2046#section-2">media type</a></dfn> is defined by the <cite>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</cite> specification [[!RFC2046]].</p>
8179

8280
<p>The <dfn><a href="http://dev.w3.org/csswg/css4-images/#image-set-notation">image-set notation</a></dfn>
@@ -97,34 +95,33 @@ <h1>The <code>picture</code> element</h1>
9795
<dt><a href="http://dev.w3.org/html5/spec/single-page.html#element-dfn-contexts" title="element-dfn-contexts">Contexts in which this element can be used</a>:</dt>
9896
<dd>Where <a href="http://dev.w3.org/html5/spec/single-page.html#embedded-content-2">embedded content</a> is expected.</dd>
9997
<dt><a href="http://dev.w3.org/html5/spec/single-page.html#element-dfn-content-model" title="element-dfn-content-model">Content model</a>:</dt>
100-
<dd>If the element has a <a href="http://dev.w3.org/html5/spec/single-page.html#attr-media-src">src</a> attribute:  <a href="http://dev.w3.org/html5/spec/single-page.html#transparent">transparent</a>, and no <code>source</code> descendants.</dd>
101-
<dd>If the element has no <a href="http://dev.w3.org/html5/spec/single-page.html#attr-media-src">src</a> attribute: Zero or more <code>source</code> elements</dd>
98+
<dd>If the element has a src attribute:  <a href="http://dev.w3.org/html5/spec/single-page.html#transparent">transparent</a>, and no <code>source</code> descendants.</dd>
99+
<dd>If the element has no src attribute: Zero or more <code>source</code> elements</dd>
102100

103101
<dd>Zero or one <code>img</code> element as <a>fallback content</a>.</dd>
104102
<dt><a href="http://dev.w3.org/html5/spec/single-page.html#element-dfn-attributes" title="element-dfn-attributes">Content attributes</a>:</dt>
105103
<dd><a href="http://dev.w3.org/html5/spec/single-page.html#global-attributes">Global attributes</a></dd>
106-
<dd>src</dd>
104+
<dd>&nbsp;</dd>
107105
<dd>width</dd>
108-
<dd>height </dd>
106+
<dd>height</dd>
109107
<dd>crossorigin</dd>
110-
<dt><a href="http://dev.w3.org/html5/spec/single-page.html#attr-dim-height"></a></dt>
111108
<dt><a href="http://dev.w3.org/html5/spec/single-page.html#element-dfn-dom" title="element-dfn-dom">DOM interface</a>:</dt>
112-
<dd>
113-
<pre>
114-
interface <dfn>HTMLPictureElement</dfn> : HTMLImageElement {
115-
116-
};</pre>
117-
</dd>
109+
<dd>Uses <a href="http://dev.w3.org/html5/spec/elements.html#htmlelement">HTMLElement</a>.</dd>
118110
</dl>
119111

120-
<p>The <code><dfn>picture</dfn></code> element used for displaying an image from a range of sources.</p>
121-
<p>The image given by the src attributes is the embedded content; the value of the alt attribute provides equivalent content for those who cannot process images or who have image loading disabled. </p>
122-
<p>For user agents that don't support picture, an author can provide an img element as fallback content. User agents SHOULD NOT show this content to the user: it is intended for Web browsers which do not support <code>picture</code>, so that a legacy <code>img</code> element can be shown.</p>
123-
<p>Sample picture element markup:</p>
124-
125-
<pre class="example">&lt;picture src=&quot;cat.png&quot;&gt;
112+
113+
<p>The <code><dfn>picture</dfn></code> element used for displaying an image that can come from a range of sources.</p>
114+
<p>The image given by the src attributes is the embedded content; the value of the alt attribute provides equivalent content for those who cannot process images or who have image loading disabled. </p>
115+
<p>For user agents that don't support picture, an author can provide an img element as fallback content. User agents SHOULD NOT show this content to the user: it is intended for Web browsers which do not support <code>picture</code>, so that a legacy <code>img</code> element can be shown.</p>
116+
<p>The picture element must not be used 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. </p>
117+
<p>The <dfn id="attr-picture-src"><code>src</code></dfn> attribute...</p>
118+
119+
<p>The <dfn id="attr-picture-width"><code>width</code></dfn> attribute and the <dfn id="attr-picture-height"><code>height</code></dfn> attributes give 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. The expected value of the attributes is a <a href="http://dev.w3.org/html5/spec/common-microsyntaxes.html#valid-non-negative-integer" title="valid non-negative integer">valid non-negative integer</a>.</p>
120+
<p>The <dfn id="attr-picture-crossorigin"><code>crossorigin</code></dfn> attribute is a <a href="http://dev.w3.org/html5/spec/single-page.html#cors-settings-attribute">CORS settings attribute</a>.</p>
121+
122+
<p>Sample picture element markup:</p>
126123

127-
&lt;/picture&gt;</pre>
124+
<pre class="example">&lt;picture src=&quot;cat.png&quot;&gt;&lt;/picture&gt;</pre>
128125

129126
<section>
130127
<p>The src attribute. <a>valid non-empty URL potentially surrounded by spaces</a> The address of the <a>media resource</a>.</p>
@@ -289,8 +286,8 @@ <h2 class="informative-subhed">User Zoom</h2>
289286
<p>Images blur when the user resizes the page. Users may zoom an image in order to see more detail. In these cases, user agents could select a higher-resolution version of an image to display.</p>
290287
<div class="issue">It's not clear whether the picture element is prescriptive (i.e. the user agent MUST show a particular image given certain device properties) or suggestive (i.e. the user agent has control over picking the best image).</div>
291288

292-
<h2 class="informative-subhed"><dfn>Art Direction</dfn></h2>
293-
<p>Web authors often want to provide different versions of the same image at different sizes depending on the viewport.</p>
289+
<h2 class="informative-subhed">Art Direction</h2>
290+
<p>Web authors often want to provide different versions of the same image at different sizes depending on the viewport. We refer to this as the <dfn>a rt direction</dfn> use case.</p>
294291
<p>A simple example of this would be changing the crop of an image based on display area:</p>
295292
<ul>
296293
<li>a website wants to normally show a large image (e.g. of a figure with a broad background) on displays that are big enough.</li>

0 commit comments

Comments
 (0)