W3C home > Mailing lists > Public > www-style@w3.org > January 2011

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 20 Jan 2011 11:41:43 -0800
Message-ID: <4D388FF7.4090000@inkedblade.net>
To: Leif Arne Storset <lstorset@opera.com>
CC: www-style@w3.org, Cathy.Chan@nokia.com
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:36 GMT