Re: [css3-background] Question on background-repeat: round

On 01/17/2011 02:15 AM, Leif Arne Storset wrote:
> <Cathy.Chan@nokia.com> skreiv Fri, 14 Jan 2011 20:54:42 +0100
>
>> The spec provides the following formula for computing the background size when background-repeat is ‘round’ for one or both
>> dimensions (http://www.w3.org/TR/css3-background/#the-background-size):
>>
>> [[
>> If X ≠ 0 is the width of the image after step one and W is the width of the background positioning area, then the rounded
>> width X' = W / round(W / X) where round() is a function that returns the nearest natural number (integer greater than zero).
>> ]]
>>
>> My understanding of the "nearest natural number" is that it could be smaller than or larger than the given number. Thus, 2.4
>> should round (down) to 2, whereas 2.7 should round (up) to 3.
>>
>> However, the examples seem to imply that rounding is always in the "up" direction to the next natural number, which is not
>> necessarily the nearest.
>
> The spec was changed back in 2009 [0], but the examples have not been updated to reflect the change. I'm guessing the editors
> will take in your suggested corrections.

Examples updated. Please let me know if I missed any others:
   http://dev.w3.org/csswg/css3-background/

~fantasai

Received on Thursday, 20 January 2011 19:42:18 UTC