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

Brad Kemper wrote:
> 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.

@_@ Where does it say that you push the first tile to the left?

The first tile is left-aligned for 'round' because if you center it and
then tile, an even number of star-shaped tiles will look like this:

   \_ _/\_  _/\_  _/\_  _/
    /\    /\    /\    /\
   \| |/\|  |/\|  |/\|  |/

Instead of like this

    _/\_  _/\_  _/\_  _/\_
   \    /\    /\    /\   /
    |/\|  |/\|  |/\|  |/\|

This is (was?) a bug in Webkit's implementation.

~fantasai

Received on Wednesday, 30 September 2009 02:37:47 UTC