- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Fri, 29 Jan 1999 14:46:40 +0000 (BST)
- To: Rasmus Kaj <rasmus@kaj.a.se>
- cc: davidp@earthlink.net, www-style@w3.org, kaj@interbizz.se
On Fri, 15 Jan 1999, Rasmus Kaj wrote some suggestions for changes to the suggested change of the change that I suggested based on change 24 in the list of suggested changes to CSS written by the WG. Ahem. Anyway, he wrote: > I'd like to suggest a further change in this, so that in the > y-direction the image is neither fitted or repeated, unless repeat-y > is given. The same change applies to fit-y (and repeat-[xy]) Good idea. Here is the updated background-repeat. Since it has now been changed considerably, I have not included [INS:] and [DEL:] markers. ---------------------------------------------------8<---------------------- 'background-repeat' Value: repeat | repeat-x | repeat-y | no-repeat | [ fit-x repeat-y? ] | [ fit-y repeat-x? ] | fit | inherit Initial: repeat Applies to: all elements Inherited: no Percentages: N/A Media: visual If a background image is specified, this property specifies whether the image is repeated (tiled), scaled to fit (stretched) or both, and how. If 'background-attachment' has the value 'scroll', then the image is repeated or scaled so as to cover the entire content and padding area of the box. If 'background-attachment' has the value 'fixed', then the image is repeated or scaled so as to cover the viewport. Note that even if the image is repeated or scaled so as to cover the viewport, it is still only visible where the background or padding area of the element is actually visible on the viewport. Values have the following meanings: repeat-x The image is repeated horizontally. The position of the first image, where the repeating should start, is given by the 'background-position' property. repeat-y Analogous to 'repeat-x', but in the vertical direction. fit-x The image is scaled horizontally so that only one copy of the image covers the entire area. The value given for the horizontal component of the 'background-position' property should be ignored. fit-y Analogous to 'fit-x', but vertically. During incremental rendering, if the final vertical size of the element is not yet known (i.e., the value of the 'height' property is 'auto'), then the UA may ignore this value. (They should not, however, treat it as 'repeat-y'.) This will prevent the need for stretch calculations to be repeatedly performed. repeat The image is repeated in both directions, as if 'repeat-x' and 'repeat-y' were both set. fit The image is scaled to fit the entire area, as if 'fit-x' and fit-y' were both set. During incremental rendering, this may be treated as 'fit-x' (see the discussion under the explanation of 'fit-y'). no-repeat The image is neither repeated or scaled to fit, thus only one copy of the image is drawn (using its intrinsic dimensions). The position of the image is given by 'background-position'. When the value of 'background-image' is a graphic without intrinsic dimensions (for example some vector graphics may lack this information), then the UA may replace the value given for the horizontal direction by 'fit-x', keeping the aspect ratio correct for the vertical direction. It is an error for authors to use graphics without intrinsic dimensions for 'background-image' if 'background-repeat' has any value other than 'fit'. ---------------------------------------------------8<---------------------- Note that I have attempted to make this property as backwards-compatible as possible. Therefore, the following value: background-repeat: repeat-x repeat-y; ...is not allowed by this suggestion. -- Ian Hickson
Received on Friday, 29 January 1999 09:47:00 UTC