55
66 < title > CSS Image Values and Replaced Content Module Level 3</ title >
77 < link href ="../default.css " rel =stylesheet type ="text/css ">
8+ < link href ="http://dev.w3.org/csswg/default.css " rel =stylesheet >
89 < link href ="http://www.w3.org/StyleSheets/TR/W3C-ED " rel =stylesheet
910 type ="text/css ">
1011
1112 < style >
1213 p { margin : .5em 0 ; }
14+ dd > p { text-indent : 0 ; }
1315 a > b { font-weight : normal; color : # 800 ; }
1416 </ style >
1517
2022
2123 < h1 > CSS Image Values and Replaced Content Module Level 3</ h1 >
2224
23- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 19 January
25+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 26 January
2426 2011</ h2 >
2527
2628 < dl >
2729 < dt > This version:</ dt >
28- <!-- <dd><a href="http://www.w3.org/TR/2011/CR-css3-images-20110119 /">http://www.w3.org/TR/2011/CR-css3-images-20110119 /</a></dd> -->
30+ <!-- <dd><a href="http://www.w3.org/TR/2011/CR-css3-images-20110126 /">http://www.w3.org/TR/2011/CR-css3-images-20110126 /</a></dd> -->
2931
3032 < dd > < a
3133 href ="http://dev.w3.org/csswg/css3-images/ "> http://dev.w3.org/csswg/css3-images/</ a >
@@ -618,6 +620,16 @@ <h2 id=gradients><span class=secno>5. </span>Gradients</h2>
618620 the size of the background sizing area. If you use a gradient in a
619621 list-style-image, the "box" will be a 1em square.</ p >
620622
623+ < p class =issue > It has been suggested that repeating gradients aren't
624+ necessary, and can instead be achieved by altering the behavior of
625+ background-repeat.</ p >
626+
627+ < p class =issue > It has been suggested that we can avoid the center position
628+ in radial gradients, and instead use background-position.</ p >
629+
630+ < p class =issue > It has been suggested that we should use some other
631+ definition for mapping angles to directions to match other parts of CSS.</ p >
632+
621633 < div >
622634 < h3 id =linear-gradients > < span class =secno > 5.1. </ span > Linear Gradients</ h3 >
623635
@@ -635,7 +647,7 @@ <h4 class=no-toc id=linear-gradient-syntax><span class=secno>5.1.1.
635647 class =prod > < code > < dfn id =ltlinear-gradient > <linear-gradient> </ dfn > = linear-gradient(
636648[
637649 [ [top | bottom] || [left | right] ]
638- ||
650+ |
639651 <angle>
640652,]?
641653<color-stop> [, <color-stop> ]+
@@ -1368,14 +1380,13 @@ <h3 id=image-resolution><span class=secno>6.1. </span>Overriding Image
13681380 resolution of images. Values have the following meanings:
13691381
13701382 < dl >
1371- < dt > < dfn id = ltresolution > <resolution> </ dfn >
1383+ < dt > <resolution>
13721384
13731385 < dd > The value sets the resolution of the image. In combination with
1374- ‘< a href ="#from-image "> < code
1375- class =css > from-image</ code > </ a > ’, the specified resolution is
1376- only used if the image does not have a resolution.
1386+ ‘< code class =css > from-image</ code > ’, the specified
1387+ resolution is only used if the image does not have a resolution.
13771388
1378- < dt > < dfn id = from-image > from-image </ dfn >
1389+ < dt > from-image
13791390
13801391 < dd > The UA must look for the resolution in the image itself. If the
13811392 image does not have a resolution, the specified <resolution> value
@@ -1398,6 +1409,8 @@ <h3 id=image-resolution><span class=secno>6.1. </span>Overriding Image
13981409 resolution in the image, if any, is ignored.
13991410
14001411 < pre >
1412+
1413+
14011414 img { image-resolution: 300dpi }
14021415 </ pre >
14031416 </ div >
@@ -1565,15 +1578,15 @@ <h3 id=image-rendering><span class=secno>6.3. </span>Determining How to
15651578 interpreted as follows:</ p >
15661579
15671580 < dl >
1568- < dt > ‘ < code class = css > auto</ code > ’
1581+ < dt > auto
15691582
15701583 < dd > The image should be scaled with an algorithm that maximizes the
15711584 appearance of the image. In particular, scaling algorithms that
15721585 ‘< code class =property > smooth</ code > ’ colors are acceptable,
15731586 such as bilinear interpolation. This is intended for images such as
15741587 photos.
15751588
1576- < dt > ‘ < code class = css > optimize-contrast</ code > ’
1589+ < dt > optimize-contrast
15771590
15781591 < dd > The image should be scaled with an algorithm that maximizes the
15791592 contrast of the image, preserving sharp lines and not smoothing colors
@@ -1614,7 +1627,7 @@ <h3 id=object-fit><span class=secno>6.4. </span>Sizing Replaced Elements:
16141627 < tr >
16151628 < th > Value:
16161629
1617- < td > fill | contain | cover
1630+ < td > fill | contain | cover | none
16181631
16191632 < tr >
16201633 < th > Initial:
@@ -1662,53 +1675,73 @@ <h3 id=object-fit><span class=secno>6.4. </span>Sizing Replaced Elements:
16621675 < dl >
16631676 < dt > fill
16641677
1665- < dd > Determine the used ‘< code class =property > height</ code > ’
1666- and ‘< code class =property > width</ code > ’ < a
1667- href ="/TR/CSS21/visudet.html "> as usual</ a > . Scale the content height
1668- and width independently so that the edges of the content just meet the
1669- edges of the box established by the used ‘< code
1670- class =property > height</ code > ’ and ‘< code
1671- class =property > width</ code > ’.
1678+ < dd >
1679+ < p > Determine the used ‘< code class =property > height</ code > ’
1680+ and ‘< code class =property > width</ code > ’ < a
1681+ href ="/TR/CSS21/visudet.html "> as usual</ a > . Scale the content height
1682+ and width independently so that the edges of the content just meet the
1683+ edges of the box established by the used ‘< code
1684+ class =property > height</ code > ’ and ‘< code
1685+ class =property > width</ code > ’.</ p >
16721686
16731687 < dt > contain
16741688
1675- < dd > Determine the used ‘< code class =property > height</ code > ’
1676- and ‘< code class =property > width</ code > ’ < a
1677- href ="/TR/CSS21/visudet.html "> as usual</ a > , except if both ‘< code
1678- class =property > height</ code > ’ and ‘< code
1679- class =property > width</ code > ’ are ‘< code
1680- class =property > auto</ code > ’, and the used value of at least one
1681- of ‘< code class =property > max-width</ code > ’ and ‘< code
1682- class =property > max-height</ code > ’ is not ‘< code
1683- class =property > none</ code > ’, then compute the element's used
1684- width and used height as though the intrinsic dimensions of the
1685- contents were infinitely large numbers whose ratio is the actual
1686- intrinsic ratio of the contents.
1687-
1688- < dd > Scale the contents of the element, preserving their aspect ratio, to
1689- the largest size such that the width of the contents is less than or
1690- equal to the used width of the box and the height of the contents is
1691- less than or equal to the used height of the box.
1689+ < dd >
1690+ < p > Determine the used ‘< code class =property > height</ code > ’
1691+ and ‘< code class =property > width</ code > ’ < a
1692+ href ="/TR/CSS21/visudet.html "> as usual</ a > , except if both
1693+ ‘< code class =property > height</ code > ’ and ‘< code
1694+ class =property > width</ code > ’ are ‘< code
1695+ class =css > auto</ code > ’, and the used value of at least one of
1696+ ‘< code class =property > max-width</ code > ’ and ‘< code
1697+ class =property > max-height</ code > ’ is not ‘< code
1698+ class =property > none</ code > ’, then compute the element's used
1699+ width and used height as though the intrinsic dimensions of the
1700+ contents were infinitely large numbers whose ratio is the actual
1701+ intrinsic ratio of the contents.</ p >
1702+
1703+ < p > Scale the contents of the element, preserving their aspect ratio, to
1704+ the largest size such that the width of the contents is less than or
1705+ equal to the used width of the box and the height of the contents is
1706+ less than or equal to the used height of the box.</ p >
16921707
16931708 < dt > cover
16941709
1695- < dd > Determine the used ‘< code class =property > height</ code > ’
1696- and ‘< code class =property > width</ code > ’ < a
1697- href ="/TR/CSS21/visudet.html "> as usual</ a > , except if both ‘< code
1698- class =property > height</ code > ’ and ‘< code
1699- class =property > width</ code > ’ are ‘< code
1700- class =property > auto</ code > ’, and the used value of at least one
1701- of ‘< code class =property > min-width</ code > ’ and ‘< code
1702- class =property > min-height</ code > ’ is not ‘< code
1703- class =css > 0</ code > ’, then compute the used width and used height
1704- of the element as though the intrinsic dimensions of the contents were
1705- infinitesimally small numbers whose ratio is the actual intrinsic ratio
1706- of the contents.
1707-
1708- < dd > Scale the contents of the element, preserving their aspect ratio, to
1709- the smallest size such that the width of the contents is greater than
1710- or equal to the used width of the box and the height of the contents is
1711- greater than or equal to the height of the box.
1710+ < dd >
1711+ < p > Determine the used ‘< code class =property > height</ code > ’
1712+ and ‘< code class =property > width</ code > ’ < a
1713+ href ="/TR/CSS21/visudet.html "> as usual</ a > , except if both
1714+ ‘< code class =property > height</ code > ’ and ‘< code
1715+ class =property > width</ code > ’ are ‘< code
1716+ class =css > auto</ code > ’, and the used value of at least one of
1717+ ‘< code class =property > min-width</ code > ’ and ‘< code
1718+ class =property > min-height</ code > ’ is not ‘< code
1719+ class =css > 0</ code > ’, then compute the used width and used height
1720+ of the element as though the intrinsic dimensions of the contents were
1721+ infinitesimally small numbers whose ratio is the actual intrinsic
1722+ ratio of the contents.</ p >
1723+
1724+ < p > Scale the contents of the element, preserving their aspect ratio, to
1725+ the smallest size such that the width of the contents is greater than
1726+ or equal to the used width of the box and the height of the contents
1727+ is greater than or equal to the height of the box.</ p >
1728+
1729+ < dt > none
1730+
1731+ < dd >
1732+ < p > Determine the used ‘< code class =property > height</ code > ’
1733+ and ‘< code class =property > width</ code > ’ < a
1734+ href ="/TR/CSS21/visudet.html "> as usual</ a > . If the content has an
1735+ intrinsic height and width, do not scale it. Otherwise, this value
1736+ must be treated as ‘< code class =css > fill</ code > ’.</ p >
1737+
1738+ < dt > scale-down < b class =issue > better name?</ b >
1739+
1740+ < dd >
1741+ < p > This value must act identically to ‘< code
1742+ class =css > none</ code > ’ or ‘< code
1743+ class =css > contain</ code > ’, whichever would make the contents
1744+ smaller.</ p >
17121745 </ dl >
17131746
17141747 < p > The ‘< code class =property > overflow</ code > ’ property
@@ -1831,9 +1864,8 @@ <h2 id=serialization><span class=secno>7. </span>Serialization</h2>
18311864 < h3 id =serializing-resolution > < span class =secno > 7.1. </ span > Serializing a
18321865 <resolution> </ h3 >
18331866
1834- < p > The serialization of the < a
1835- href ="#ltresolution "> < b > <resolution> </ b > </ a > value type is defined in
1836- the CSSOM spec.</ p >
1867+ < p > The serialization of the < b > <resolution> </ b > value type is defined
1868+ in the CSSOM spec.</ p >
18371869
18381870 < p class =note > This spec defines several new units for resolutions. These
18391871 can all be converted to the canonical "dpcm" unit that CSSOM defines the
@@ -2055,13 +2087,11 @@ <h3 id=serializing-properties><span class=secno>7.7. </span>Serializing
20552087 class =property > image-resolution</ code > </ a > ’ property:
20562088
20572089 < ol >
2058- < li > If the ‘< a href ="#from-image "> < code
2059- class =css > from-image</ code > </ a > ’ keyword is specified in the
2060- property value, append "from-image" to s.
2090+ < li > If the ‘< code class =css > from-image</ code > ’ keyword is
2091+ specified in the property value, append "from-image" to s.
20612092
2062- < li > If both the ‘< a href ="#from-image "> < code
2063- class =css > from-image</ code > </ a > ’ keyword and a <resolution>
2064- are specified, append a space " " to s.
2093+ < li > If both the ‘< code class =css > from-image</ code > ’ keyword
2094+ and a <resolution> are specified, append a space " " to s.
20652095
20662096 < li > If a <resolution is specified, serialize it and append it to s.
20672097 </ ol >
0 commit comments