1616
1717 < h1 > CSS Image Values and Replaced Content Module Level 4</ h1 >
1818
19- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 27 July 2012</ h2 >
19+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 3 August 2012</ h2 >
2020
2121 < dl >
2222 < dt > This Version:
2323
2424 < dd > < a
2525 href ="http://dev.w3.org/csswg/css4-images/ "> http://dev.w3.org/csswg/css4-images/</ a >
26- <!-- <dd><a href="http://www.w3.org/TR/2012/ED-css4-images-20120727 /">http://www.w3.org/TR/2012/WD-css4-images-20120727 /</a>-->
26+ <!-- <dd><a href="http://www.w3.org/TR/2012/ED-css4-images-20120803 /">http://www.w3.org/TR/2012/WD-css4-images-20120803 /</a>-->
2727 <!--
2828 <dt>Latest Version:
2929 <dd><a href="http://www.w3.org/TR/css4-images/">http://www.w3.org/TR/css4-images/</a>
@@ -174,18 +174,22 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
174174 Bidi-sensitive Images</ a >
175175 </ ul >
176176
177- < li > < a href ="#element-notation "> < span class =secno > 4.3. </ span > Using
177+ < li > < a href ="#image-set-notation "> < span class =secno > 4.3. </ span >
178+ Resolution Negotiation: the ‘< code class =css > image-set()</ code > ’
179+ notation</ a >
180+
181+ < li > < a href ="#element-notation "> < span class =secno > 4.4. </ span > Using
178182 Elements as Images: the ‘< code class =css > element()</ code > ’
179183 notation</ a >
180184 < ul class =toc >
181- < li > < a href ="#paint-sources "> < span class =secno > 4.3 .1. </ span > Paint
185+ < li > < a href ="#paint-sources "> < span class =secno > 4.4 .1. </ span > Paint
182186 Sources</ a >
183187
184- < li > < a href ="#element-cycles "> < span class =secno > 4.3 .2. </ span > Cycle
188+ < li > < a href ="#element-cycles "> < span class =secno > 4.4 .2. </ span > Cycle
185189 Detection</ a >
186190 </ ul >
187191
188- < li > < a href ="#cross-fade-function "> < span class =secno > 4.4 . </ span >
192+ < li > < a href ="#cross-fade-function "> < span class =secno > 4.5 . </ span >
189193 Combining images: the ‘< code class =css > cross-fade()</ code > ’
190194 notation</ a >
191195 </ ul >
@@ -444,6 +448,10 @@ <h2 id=resolution-units><span class=secno>3. </span> Resolution Units: the
444448 < dt > < dfn id =dppx > ‘< code class =css > dppx</ code > ’</ dfn >
445449
446450 < dd > dots per ‘< code class =css > px</ code > ’ unit
451+
452+ < dt > < dfn id =x > ‘< code class =css > x</ code > ’</ dfn >
453+
454+ < dd > identical to ‘< a href ="#dppx "> < code class =css > dppx</ code > </ a > ’
447455 </ dl >
448456
449457 < p > The ‘< a href ="#resolution-type "> < code
@@ -484,6 +492,7 @@ <h2 id=image-values><span class=secno>4. </span> Image Values: the
484492
485493 < pre class =prod > < dfn id =image-type > <image> </ dfn > = < i > <url> </ i > | < a
486494 href ="#image-list-type "> < i > <image-list> </ i > </ a > | < a
495+ href ="#image-set-type "> < i > <image-set> </ i > </ a > | < a
487496 href ="#gradient-type "> < i > <gradient> </ i > </ a > </ pre >
488497
489498 < p > An ‘< a href ="#image-type "> < code class =css > <image> </ code > </ a > ’
@@ -776,6 +785,73 @@ <h4 id=bidi-images><span class=secno>4.2.4. </span> Bidi-sensitive Images</h4>
776785 items, however, it will be flipped in the inline direction, so it still
777786 points into the content.
778787 </ div >
788+
789+ < h3 id =image-set-notation > < span class =secno > 4.3. </ span > Resolution
790+ Negotiation: the ‘< code class =css > image-set()</ code > ’ notation</ h3 >
791+
792+ < p > Delivering the most appropriate image resolution for a user's device
793+ can be a difficult task. Ideally, images should be in the same resolution
794+ as the device they're being viewed in, which can vary between users.
795+ However, other factors can factor into the decision of which image to
796+ send; for example, if the user is on a slow mobile connection, they may
797+ prefer to receive lower-res images rather than waiting for a large
798+ proper-res image to load. The ‘< code class =css > image-set()</ code > ’
799+ function allows an author to ignore most of these issues, simply providing
800+ multiple resolutions of an image and letting the UA decide which is most
801+ appropriate in a given situation.
802+
803+ < p > The syntax for ‘< code class =css > image-set()</ code > ’ is:
804+
805+ < pre class =prod >
806+ <!--
807+ --> < dfn
808+ id =image-set-type > <image-set> </ dfn > = image-set( [ < a
809+ href ="#image-set-decl-type "> < i > <image-set-decl> </ i > </ a > , ]+ [ < i > image-set-decl> </ i > | <color> ] )
810+ <!--
811+ --> < dfn
812+ id =image-set-decl-type > <image-set-decl> </ dfn > = [ <url> | <string> ] < a
813+ href ="#resolution-type "> < i > <resolution> </ i > </ a > </ pre >
814+
815+ < p > Each ‘< code class =css > <string> </ code > ’ or ‘< code
816+ class =css > <url> </ code > ’ inside ‘< code
817+ class =css > image-set()</ code > ’ represents an image, just as if the < a
818+ href ="#url-notation "> ‘< code class =css > url()</ code > ’ notation</ a > had
819+ been used. As usual for URLs in CSS, relative URLs are resolved to an
820+ absolute URL (as described in Values & Units < a href ="#CSS3VAL "
821+ rel =biblioentry > [CSS3VAL]<!--{{!CSS3VAL}}--> </ a > ) when a specified
822+ ‘< code class =css > image-set()</ code > ’ value is computed.
823+
824+ < p > Every < a href ="#image-set-decl-type "> < i > <image-set-decl> </ i > </ a > in
825+ a given ‘< code class =css > image-set()</ code > ’ must have a different < a
826+ href ="#resolution-type "> < i > <resolution> </ i > </ a > , or else the function
827+ is invalid.
828+
829+ < p > The value of ‘< code class =css > image-set()</ code > ’ is one or more < a
830+ href ="#image-set-decl-type "> < i > <image-set-decl> </ i > </ a > s, composed of a
831+ URL and a resolution, and optionally a fallback color at the end of the
832+ list. The function represents the first such image that is not an < a
833+ href ="#invalid-image "> < i > invalid image</ i > </ a > , loaded in whatever order
834+ the UA decides is best. (In other words, the order that they are declared
835+ in the function makes no difference.) If the optional fallback color is
836+ specified, the UA may decide at any point to use the fallback color
837+ instead of attempting to load additional < a
838+ href ="#image-set-decl-type "> < i > <image-set-decl> </ i > </ a > s, in which case
839+ the function represents a solid-color image of the given color with no < a
840+ href ="#intrinsic-dimensions "> < i > intrinsic dimensions</ i > </ a > . If all of
841+ the provided < a
842+ href ="#image-set-decl-type "> < i > <image-set-decl> </ i > </ a > s are < a
843+ href ="#invalid-image "> < i > invalid images</ i > </ a > and a fallback color was
844+ not provided, the entire ‘< code class =css > image-set()</ code > ’ function
845+ must be treated as an < a href ="#invalid-image "> < i > invalid image</ i > </ a > .
846+
847+ < p > If an < a href ="#image-set-decl-type "> < i > <image-set-decl> </ i > </ a > is
848+ chosen and successfully loaded, the associated < a
849+ href ="#resolution-type "> < i > <resolution> </ i > </ a > is the image's < a
850+ href ="#intrinsic-resolution "> < i > intrinsic resolution</ i > </ a > .
851+
852+ < div class =example >
853+ < p class =issue > Provide an example.
854+ </ div >
779855 <!--
780856EEEEEEEEEEEEEEEEEEEEEElllllll tttt
781857E::::::::::::::::::::El:::::l ttt:::t
@@ -795,7 +871,7 @@ <h4 id=bidi-images><span class=secno>4.2.4. </span> Bidi-sensitive Images</h4>
795871EEEEEEEEEEEEEEEEEEEEEEllllllll eeeeeeeeeeeeee mmmmmm mmmmmm mmmmmm eeeeeeeeeeeeee nnnnnn nnnnnn ttttttttttt
796872-->
797873
798- < h3 id =element-notation > < span class =secno > 4.3 . </ span > Using Elements as
874+ < h3 id =element-notation > < span class =secno > 4.4 . </ span > Using Elements as
799875 Images: the ‘< code class =css > element()</ code > ’ notation</ h3 >
800876
801877 < p > The ‘< code class =css > element()</ code > ’ function allows an author to
@@ -1097,7 +1173,7 @@ <h3 id=element-notation><span class=secno>4.3. </span> Using Elements as
10971173 preview boxes to help navigate through the page.
10981174 </ div >
10991175
1100- < h4 id =paint-sources > < span class =secno > 4.3 .1. </ span > Paint Sources</ h4 >
1176+ < h4 id =paint-sources > < span class =secno > 4.4 .1. </ span > Paint Sources</ h4 >
11011177
11021178 < p > Host languages may define that some elements provide a < dfn
11031179 id =paint-source title =paint-source > paint source</ dfn > . Paint sources have
@@ -1147,7 +1223,7 @@ <h4 id=paint-sources><span class=secno>4.3.1. </span> Paint Sources</h4>
11471223 define ways to refer to paint sources in external documents, or ones that
11481224 are created solely by script and never inserted into a document at all.
11491225
1150- < h4 id =element-cycles > < span class =secno > 4.3 .2. </ span > Cycle Detection</ h4 >
1226+ < h4 id =element-cycles > < span class =secno > 4.4 .2. </ span > Cycle Detection</ h4 >
11511227
11521228 < p > The ‘< code class =css > element()</ code > ’ function can produce
11531229 nonsensical circular relationships, such as an element using itself as its
@@ -1193,7 +1269,7 @@ <h4 id=element-cycles><span class=secno>4.3.2. </span> Cycle Detection</h4>
11931269-->
11941270
11951271
1196- < h3 id =cross-fade-function > < span class =secno > 4.4 . </ span > Combining images:
1272+ < h3 id =cross-fade-function > < span class =secno > 4.5 . </ span > Combining images:
11971273 the ‘< code class =css > cross-fade()</ code > ’ notation</ h3 >
11981274
11991275 < p > When transitioning between images, CSS requires a way to explicitly
@@ -3926,7 +4002,7 @@ <h2 class=no-num id=index>Index</h2>
39264002 title ="cover constraint "> < strong > 6.3.2.</ strong > </ a >
39274003
39284004 < li > decorated bounding box, < a href ="#decorated-bounding-box "
3929- title ="decorated bounding box "> < strong > 4.3 .</ strong > </ a >
4005+ title ="decorated bounding box "> < strong > 4.4 .</ strong > </ a >
39304006
39314007 < li > default object size, < a href ="#default-object-size "
39324008 title ="default object size "> < strong > 6.1.</ strong > </ a >
@@ -3944,10 +4020,10 @@ <h2 class=no-num id=index>Index</h2>
39444020 title ="''dppx'' "> < strong > 3.</ strong > </ a >
39454021
39464022 < li > element-not-rendered, < a href ="#element-not-rendered "
3947- title =element-not-rendered > < strong > 4.3 .</ strong > </ a >
4023+ title =element-not-rendered > < strong > 4.4 .</ strong > </ a >
39484024
39494025 < li > <element-reference> , < a href ="#element-reference-type "
3950- title ="<element-reference> "> < strong > 4.3 .</ strong > </ a >
4026+ title ="<element-reference> "> < strong > 4.4 .</ strong > </ a >
39514027
39524028 < li > ending shape, < a href ="#ending-shape "
39534029 title ="ending shape "> < strong > 5.2.</ strong > </ a >
@@ -3981,7 +4057,7 @@ <h2 class=no-num id=index>Index</h2>
39814057 title ="<image> "> < strong > 4.</ strong > </ a >
39824058
39834059 < li > <image-combination> , < a href ="#ltimage-combination "
3984- title ="<image-combination> "> < strong > 4.4 .</ strong > </ a >
4060+ title ="<image-combination> "> < strong > 4.5 .</ strong > </ a >
39854061
39864062 < li > <image-decl> , < a href ="#image-decl-type "
39874063 title ="<image-decl> "> < strong > 4.2.</ strong > </ a >
@@ -3995,6 +4071,12 @@ <h2 class=no-num id=index>Index</h2>
39954071 < li > image-resolution, < a href ="#image-resolution "
39964072 title =image-resolution > < strong > 7.1.</ strong > </ a >
39974073
4074+ < li > <image-set> , < a href ="#image-set-type "
4075+ title ="<image-set> "> < strong > 4.3.</ strong > </ a >
4076+
4077+ < li > <image-set-decl> , < a href ="#image-set-decl-type "
4078+ title ="<image-set-decl> "> < strong > 4.3.</ strong > </ a >
4079+
39984080 < li > intrinsic aspect ratio, < a href ="#intrinsic-aspect-ratio "
39994081 title ="intrinsic aspect ratio "> < strong > 6.1.</ strong > </ a >
40004082
@@ -4031,7 +4113,7 @@ <h2 class=no-num id=index>Index</h2>
40314113 < li > objects, < a href ="#objects " title =objects > < strong > 6.</ strong > </ a >
40324114
40334115 < li > paint-source, < a href ="#paint-source "
4034- title =paint-source > < strong > 4.3 .1.</ strong > </ a >
4116+ title =paint-source > < strong > 4.4 .1.</ strong > </ a >
40354117
40364118 < li > <position> , < a href ="#position "
40374119 title ="<position> "> < strong > 5.2.1.</ strong > </ a >
@@ -4070,6 +4152,9 @@ <h2 class=no-num id=index>Index</h2>
40704152 < li > as conformance class, < a href ="#style-sheet "
40714153 title ="style sheet, as conformance class "> < strong > 10.2.</ strong > </ a >
40724154 </ ul >
4155+
4156+ < li > ‘< a href ="#x "> < code class =css > x</ code > </ a > ’, < a href ="#x "
4157+ title ="''x'' "> < strong > 3.</ strong > </ a >
40734158 </ ul >
40744159 <!--end-index-->
40754160
0 commit comments