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 16:42:13 -0700
Message-Id: <4ED974A2-DF7F-40C8-98CC-88322412059B@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Sep 28, 2009, at 3:58 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> On Mon, Sep 28, 2009 at 5:51 PM, Brad Kemper <brad.kemper@gmail.com>  
> wrote:
>> 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.
>
> Ah, I don't see it that way.  I presumed that it would tile in a
> similar manner to backgrounds.
>
>> 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?
>
> Yes.

It seems unnecessary to say anything about left, right, and center  
here. If the following instruction is to "tile and draw", then that  
already is pretty loosely defined, but to me means fill with as many  
whole tiles as you can.

>
>> 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.
>
> That is an interesting problem, and *does* seem to be a real issue.

Thus my assumtions that it worked differently than you say. I don't  
think it is very clear that it does or doesn't otherwise.

> (By my current reading, 'repeat' will only repeat whole tiles, and so
> in this case will be 1 short of full in some cases.)

One plus some percentage of one, in half if all possible box sizes,  
no? Half of all box sizes would fit an odd number of whole tiled, and  
half an even number.

> On the other hand, this behavior does allow it to still sync up with
> backgrounds that are repeated.  Filling it to the maximum (sometimes
> using an even number of tiles) won't always do that.

I don't think that is an especially important consideration. It also  
seems to assume the left and right corner pieces are the same size, or  
maybe some multiple of the tile tile size. If the left is a few pixels  
wider than the left, it still won't align with centered backgrounds. I  
really can't think of any cases offhand where it would matter much.

>
> Bert, fantasai, any comment on the intentions here?
>
> ~TJ
Received on Monday, 28 September 2009 23:43:09 GMT

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