W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: [css3-background] background-size and zero length

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 11 May 2010 10:36:42 -0700
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <08BD5C97-E8D4-44B8-AE7B-164225BFCA6E@gmail.com>
To: Brian Manthos <brianman@microsoft.com>
I've never been too thrilled with the wording of that sentence, but I read it as:

x = width of image after step one;
if (x != 0) {
	round to integer greater than zero;
}

Since there was no "else" clause, I took it to mean that no rounding should take place otherwise. That is also what seems most sensible (to me).

I'm curious about what the 3 renderings are, but too pressed for time to try to check it out myself right now.


On May 11, 2010, at 8:59 AM, Brian Manthos wrote:

> Elaborating...
>  
> I see 3 different renderings in 3 different browsers, so I’d like to make sure I understand it correctly.
>  
> From: Brian Manthos 
> Sent: Tuesday, May 11, 2010 8:58 AM
> To: 'Brad Kemper'
> Cc: www-style@w3.org
> Subject: RE: [css3-background] background-size and zero length
>  
> Where is the rounding rule for the zero case defined?
>  
> I see it defined for the non-zero case, as you observed as well.
>  
> Is the zero case rounding rule left as UA-defined?
>  
>  
> I’m not clear on how to follow this rule without an equation or having it specified in prose:
> If ‘background-repeat’ is ‘round’ for one (or both) dimensions, there is a second step. The UA must scale the image in that dimension (or both dimensions) so that it fits a whole number of times in the background positioning area.
>  
>  
> Thanks,
> -Brian
>  
> From: Brad Kemper [mailto:brad.kemper@gmail.com] 
> Sent: Tuesday, May 11, 2010 8:39 AM
> To: Brian Manthos
> Cc: www-style@w3.org
> Subject: Re: [css3-background] background-size and zero length
>  
>  
> On May 11, 2010, at 7:04 AM, Brian Manthos wrote:
>  
> 
> Typo.  Mea culpa.
>  
> The style rule should have been...
>  
> div
> {
>         background: url(http://www.microsoft.com/favicon.ico) 5px 5px;
>         background-size: 0px 20px;
>         background-repeat:round;
>         width:12px;
>         height:17px;
> }
>  
> -Brian
>  
> [...] 
> How many images should be rendered and at what size?
>  
> An infinite number, with zero width for each tile. Rounding does not change that, because the "If X ≠ 0 is the width of the image after step one" part is not fulfilled. 
>  
> A tile with no width or no height cannot be drawn, so you shouldn't try.
>  
> That's how I understand it, anyway.




Received on Tuesday, 11 May 2010 17:37:19 GMT

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