@@ -2121,255 +2121,7 @@ <h3 id="best-pg-brk">"Best" page breaks</h3>
21212121
21222122< h2 id ="image-properties "> Image Properties</ h2 >
21232123
2124- < p class ="note "> The following properties may be transferred to a more appropriate
2125- CSS module in the future.</ p >
2126-
2127- < h3 id ="image-orientation "> Orienting an Image on the Page: the < a href ="#propdef-img-orient "> image-orientation</ a > property</ h3 >
2128-
2129- < p > Images from camera phones, digital cameras or scanners may be encoded sideways.
2130- For example, the first row of image data may represent the leftmost or
2131- rightmost column of image pixels. Furthermore, often such devices have limited
2132- resources, and do not have the capability to rotate the image into an upright
2133- orientation. However, this type of device may have internal knowledge or can
2134- accept input from its user as to the rotational correction to perform.</ p >
2135-
2136- < p > The image-orientation property provides a way to specify an 'out-of-band'
2137- rotation to be applied to image source data. This facility is not intended to
2138- specify layout transformations such as arbitrary rotation or flipping the image
2139- in the horizontal or vertical direction. It is not needed to correctly orient
2140- an image when printing in landscape versus portrait orientation, as that
2141- rotation is done as part of layout.</ p >
2142-
2143- < table class ="propdef " summary ="image-orientation property definition ">
2144- < tr >
2145- < th > Name:
2146- < td > < dfn id ="propdef-img-orient "> image-orientation</ dfn >
2147- < tr >
2148- < th > Value:
2149- < td > <angle>
2150- < tr >
2151- < th > Initial:
2152- < td > 0deg
2153- < tr >
2154- < th > Applies to:
2155- < td > images
2156- < tr >
2157- < th > Inherited:
2158- < td > N/A
2159- < tr >
2160- < th > Percentages:
2161- < td > N/A
2162- < tr >
2163- < th > Media:
2164- < td > visual
2165- < tr >
2166- < th > Computed value:
2167- < td > normalized angle (''0deg'', ''90deg'', ''180deg'', or ''270deg'')
2168- </ table >
2169-
2170- < p > 'image-orientation' specifies an orthogonal rotation to be applied to an image
2171- before it is laid out. CSS layout processing applies to the image after
2172- rotation. This implies, for example:</ p >
2173-
2174- < ul >
2175- < li > The intrinsic height and width are derived from the rotated rather than the
2176- original image dimensions;</ li >
2177- < li > The height (width) property applies to the vertical (horizontal) dimension
2178- of the image, < em > after</ em > rotation.</ li >
2179- </ ul >
2180-
2181- < p > The following values for the < span class ="property "> 'image-orientation'</ span >
2182- property apply to an image:</ p >
2183-
2184- < dl >
2185- < dt > <angle></ dt >
2186- < dd > Positive values cause the image to be rotated to the right (in a clockwise
2187- direction), while negative values cause a rotation to the left. The angular
2188- value in degrees, radians or grads is rounded to the nearest cardinal angle.
2189- Values half way between cardinal angles, such as 45deg, round forward, in the
2190- direction of rotation. Values greater than 360deg or less than -360deg are
2191- moduloed to produce a value between 0deg and 360deg. Analogous rules apply for
2192- rad and grad unit values.</ dd >
2193- </ dl >
2194- < pre class ="example ">
2195- The following example rotates the image 90 degrees clockwise:
2196-
2197- img.ninety { image-orientation: 90deg }
2198- ...
2199- <img class="ninety" src=... />
2200- </ pre >
2201-
2202- < h3 id ="img-fit "> The 'image-fit' Property</ h3 >
2203-
2204- < table class ="propdef ">
2205- < tr >
2206- < th > Name:
2207- < td > < dfn id ="propdef-image-fit "> image-fit</ dfn >
2208- < tr >
2209- < th > Value:
2210- < td > fill | contain | cover
2211- < tr >
2212- < th > Initial:
2213- < td > fill
2214- < tr >
2215- < th > Applies to:
2216- < td > replaced elements
2217- < tr >
2218- < th > Inherited:
2219- < td > yes
2220- < tr >
2221- < th > Percentages:
2222- < td > N/A
2223- < tr >
2224- < th > Media:
2225- < td > visual
2226- < tr >
2227- < th > Computed value:
2228- < td > specified value
2229- </ table >
2230-
2231- < p > The 'image-fit' property specifies how the contents of a replaced element
2232- should be scaled relative to the box established by its used height and width.
2233- It also enables scaling a replaced element's contents up to a specified maximum
2234- size or down to a specified minimum size while preserving its aspect ratio.</ p >
2235-
2236- < p > Not all replaced elements can be scaled, but images typically can.</ p >
2237-
2238- < p > The contents of a replaced element with an intrinsic aspect ratio (which may be
2239- derived from intrinsic dimensions) are scaled as follows:</ p >
2240-
2241- < dl >
2242-
2243- < dt > fill</ dt >
2244- < dd > Determine the used 'height' and 'width' < a href ="/TR/CSS21/visudet.html "> as
2245- usual</ a > . Scale the content height and width independently so that the edges
2246- of the content just meet the edges of the box established by the used 'height'
2247- and 'width'.</ dd >
2248-
2249- < dt > contain</ dt >
2250- < dd > Determine the used 'height' and 'width' < a href ="/TR/CSS21/visudet.html "> as
2251- usual</ a > , except if both 'height' and 'width' are 'auto', and the used value
2252- of at least one of 'max-width' and 'max-height' is not 'none', then compute the
2253- element's used width and used height as though the intrinsic dimensions of the
2254- contents were infinitely large numbers whose ratio is the actual intrinsic
2255- ratio of the contents.</ dd >
2256- < dd > Scale the contents of the element, preserving their aspect ratio, to the
2257- largest size such that the width of the contents is less than or equal to the
2258- used width of the box and the height of the contents is less than or equal to
2259- the used height of the box.</ dd >
2260-
2261- < dt > cover</ dt >
2262- < dd > Determine the used 'height' and 'width' < a href ="/TR/CSS21/visudet.html "> as
2263- usual</ a > , except if both 'height' and 'width' are 'auto', and the used value
2264- of at least one of 'min-width' and 'min-height' is not '0', then compute the
2265- used width and used height of the element as though the intrinsic dimensions of
2266- the contents were infinitesimally small numbers whose ratio is the actual
2267- intrinsic ratio of the contents.</ dd >
2268- < dd > Scale the contents of the element, preserving their aspect ratio, to the
2269- smallest size such that the width of the contents is greater than or equal to
2270- the used width of the box and the height of the contents is greater than or
2271- equal to the height of the box.</ dd >
2272- </ dl >
2273-
2274- < p > The 'overflow' property determines how to render parts of the replaced
2275- element's content that extend beyond the edges of its box. See the < a href ="#propdef-image-position "> 'image-position'</ a > property for positioning the
2276- object with respect to the element's box.</ p >
2277- < p class ="note ">
2278- Note: the 'image-fit' property has similar semantics to the fit attribute in
2279- [[SMIL10]].</ p >
2280- < div class ="figure ">
2281-
2282- < p > < img src ="img_scale.png " style ="width: 70%; border: thin solid black; " alt ="Illustration of the four values "> </ p >
2283- < p class ="caption ">
2284- An example showing how each of the four values of 'image-fit' causes the
2285- replaced element (blue figure) to be scaled to fit its height/width box (shown
2286- with a green background), with overflow 'visible' and 'hidden', using the
2287- initial value for 'image-position'.</ p >
2288- </ div >
2289-
2290- < h3 id ="img-fit "> The 'image-position' Property</ h3 >
2291-
2292- < table class ="propdef ">
2293- < tr >
2294- < th > Name:
2295- < td > < dfn id ="propdef-image-posn "> image-position</ dfn >
2296- < tr >
2297- < th > Value:
2298- < td > [ [ < a class ="noxref " href ="/TR/CSS21/syndata.html#value-def-percentage "> < span class ="value-inst-percentage "> <percentage></ span > </ a > | < a class ="noxref " href ="/TR/CSS21/syndata.html#value-def-length "> < span class ="value-inst-length "> <length></ span > </ a > | left | center | right ] [
2299- < a class ="noxref " href ="/TR/CSS21/syndata.html#value-def-percentage "> < span class ="value-inst-percentage "> <percentage></ span > </ a > | < a class ="noxref " href ="/TR/CSS21/syndata.html#value-def-length "> < span class ="value-inst-length "> <length></ span > </ a > | top | center | bottom ]? ] | [
2300- [ left | center | right ] || [ top | center | bottom ] ]
2301- < tr >
2302- < th > Initial:
2303- < td > 50% 50%
2304- < tr >
2305- < th > Applies to:
2306- < td > replaced elements
2307- < tr >
2308- < th > Inherited:
2309- < td > yes
2310- < tr >
2311- < th > Percentages:
2312- < td > refer to width and height of box itself
2313- < tr >
2314- < th > Media:
2315- < td > visual
2316- < tr >
2317- < th > Computed value:
2318- < td > specified value
2319- </ table >
2320-
2321- < p > The 'image-position' property determines the alignment of the replaced element
2322- inside its box. The values have the same meaning as the values for the
2323- 'background-position' property. See
2324- < a href ="/TR/CSS21/colors.html#propdef-background-position "> background-position</ a >
2325- of these values.</ p >
2326-
2327- < dl >
2328-
2329- < dt > <percentage> <percentage></ dt >
2330- < dd > With a value pair of '0% 0%', the upper left corner of the image is aligned
2331- with the upper left corner of the box's padding edge. A value pair of '100%
2332- 100%' places the lower right corner of the image in the lower right corner of
2333- padding area. With a value pair of '14% 84%', the point 14% across and 84% down
2334- the image is to be placed at the point 14% across and 84% down the padding
2335- area.</ dd >
2336-
2337- < dt > <length> <length></ dt >
2338- < dd > With a value pair of '2cm 2cm', the upper left corner of the image is placed
2339- 2cm to the right and 2cm below the upper left corner of the padding area.</ dd >
2340-
2341- < dt > 'top left', 'left top'</ dt >
2342- < dd > Same as '0% 0%'.</ dd >
2343-
2344- < dt > 'top', 'top center', 'center top'</ dt >
2345- < dd > Same as '50% 0%'.</ dd >
2346-
2347- < dt > 'right top', 'top right'</ dt >
2348- < dd > Same as '100% 0%'.</ dd >
2349-
2350- < dt > 'left', 'left center', 'center left'</ dt >
2351- < dd > Same as '0% 50%'.</ dd >
2352-
2353- < dt > 'center', 'center center'</ dt >
2354- < dd > Same as '50% 50%'.</ dd >
2355-
2356- < dt > 'right', 'right center', 'center right'</ dt >
2357- < dd > Same as '100% 50%'.</ dd >
2358-
2359- < dt > 'bottom left', 'left bottom'</ dt >
2360- < dd > Same as '0% 100%'.</ dd >
2361-
2362- < dt > 'bottom', 'bottom center', 'center bottom'</ dt >
2363- < dd > Same as '50% 100%'.</ dd >
2364-
2365- < dt > 'bottom right', 'right bottom'</ dt >
2366- < dd > Same as '100% 100%'.</ dd >
2367- </ dl >
2368-
2369- < p > The computed value is the same as the specified value.</ p >
2370- < p class ="note ">
2371- Note: areas of the box not covered by the replaced element will show the
2372- element's background.</ p >
2124+ < p class ="note "> This section has been moved to [CSS3IMAGES].</ p >
23732125
23742126< h2 class ="no-num " id ="properties-list "> Appendix A: Applicable CSS2.1 Properties</ h2 >
23752127
0 commit comments