W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: Border-Images and 'round': CSS Backgrounds and Borders Module Level 3

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 28 Sep 2009 15:51:06 -0700
Message-Id: <486AE8E4-4079-4BDE-AB34-78C4D7A18599@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Sep 28, 2009, at 2:01 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> On Mon, Sep 28, 2009 at 3:39 PM, Brad Kemper <brad.kemper@gmail.com>  
> wrote:
>> If I have say, a bottom that is 200px-wide between the bottom-left  
>> and
>> bottom-right corner pieces, and my 120px-wide tile images are  
>> squished down
>> to 100px-wide, then two of them will fit perfectly in the alotted  
>> space.
>> Thus you have corner, tile, tile, corner, with no further space to  
>> deal
>> with. Where does centering have any effect, and where are you  
>> getting 50px
>> spaces?
>
> I *think* you're mentally running the algorithm as if it was "Scale ->
> Tile -> Position".  As described in the spec, though, it's "Scale ->
> Position -> Tile".
>
> Two copies of the image will indeed fit perfectly in the box, but you
> don't *have* two copies until the last step, *after* the 'source copy'
> has already been scaled and positioned.  Thus you must position the
> first copy on the left edge so that when it tiles the second copy
> exactly fills the right half.  If you were to center it first, then
> the tiling wouldn't work correctly.

Sure it would. The alignment wouldn't change as you added more tiles.  
The would just push previous tiles to the left. Like when you add  
words to a centered paragraph. At least that's how I read it.

You're saying that only the first tile is on the left edge for  
"round", so that successive tile can be added to the right of it?

By that logic, if "repeat" is used instead of "round", then the first  
tile is centered, and successive tiles are added to both sides? Then  
with an even number of tiles there is always at least an extra tile's  
worth of space left over, split between the two sides? That seems  
pretty screwey to me. It seems to guarantee that for about half the  
box widths, the edge will not be filled as fully as it could be with  
repeating tiles. Why would you want that? Or are you saying they would  
be clipped at the two edges where they ran into the corner pieces?  
That would be even worse! The "tile and draw" part doesn't actually  
say if "repeat" is only tiling whole tiles, but I had assumed it would.
Received on Monday, 28 September 2009 22:51:57 GMT

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