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

So, any thoughts on this?

In short, I am proposing that:

1) when the "round" keyword is used with border-image, that the tiles  
can get either longer or shorter to make them fit in the available  
space, instead of just shorter.

2) when the "repeat" keyword is used with border-image, that the left- 
over space be distributed between and around the tiles, instead of  
just on the ends of the row of abutting tiles.

3) that the wording of the "position" step of the drawing process be  
changed, so that it doesn't talk about how the tiles are aligned  
(centered, left, etc.), since "stretch" and "round" would not produce  
different results based on alignment, and neither would "repeat" if  
#2, above, is adopted.

4) if #2, above, is not adopted, then a new keyword, "distribute", be  
added as a fourth choice, and that the wording of the "position" step  
only mention alignment for "repeat", as it would be the only keyword  
for which it mattered.

On Sep 26, 2009, at 10:27 PM, Brad Kemper wrote:

> I don't know if this has been brought up before (I couldn't find  
> anything in the archives, but that doesn't mean it hasn't). But I  
> was looking at the editor's draft[1] and noticed that the 'round'  
> keyword only causes tiles to be rounded down (compressed in the  
> direction of their repetition), not up (expanded  in the direction  
> of their repetition).
>
> I'm not sure why I didn't notice that before, or why it didn't  
> register with me, but it seems to me that they should be compressed  
> to less than 100% of their normal size if there is half or more of a  
> tile's worth of space left over, and expanded to beyond 100% of  
> their normal size if there is less than half a tile of left over  
> space available. That way, if you have a tile that is, say, 49% of  
> the available space, the two tiles will just grow a little to fit  
> perfectly, instead of massively resizing the tiles in order to cram  
> a third one in there.
>
> Does anyone remember why it is reduce-only? If it is a matter of the  
> tile losing resolution as it grows, I think that is more acceptable  
> for the smaller adjustments that may be needed that having much  
> larger adjustments required. And it is no worse than 'stretch'. Or  
> does this have something to do with anti-aliasing a high-contrast  
> edge (allowing a seamless abutting of tiles) into a lower contrast  
> edge that would show where the tile edges are (I'm not sure if that  
> sort of thing sometimes happens when shrinking too, or if there is  
> another way around that)?
>
> _____
>
> Another thing that surprised me when I was reading about the border- 
> image drawing process[2] more closely, was that in the "position"  
> step, if there is space left over after the tiling (for "repeat"  
> keyword) it goes on the ends of the row of tiles (the row of  
> abutting tiles is centered in the available space). I always just  
> assumed the tiles would be distributed in the space evenly. Anyone  
> who did not want gaps between the tiles would have used "round"  
> instead of "repeat". I definitely think that distributing the tiles  
> would yield a nicer effect than centering them, as I imagine  
> "repeat" being used mainly for dash-pattern types of borders. If I  
> am wrong, and there are some significant use cases that I am not  
> thinking of, then maybe a fourth keyword of "distribute" could be  
> added?
>
> Also, just a small, not-too-important comment about the wording of  
> that step: it seams to imply that being left-aligned is important  
> for "round", but not "stretch". Am I missing something? Isn't it the  
> same for both whatever the alignment (it fills the entire space,  
> right?). Really it is "repeat" that is the exception, not "round",  
> as only "repeat" has extra space to deal with at that step. I'm  
> thinking this choice of wording is a relic of a much earlier draft.
>
>
> [1] http://dev.w3.org/csswg/css3-background/#the-border-image-repeat
> [2] http://dev.w3.org/csswg/css3-background/#border-image-process

Received on Monday, 28 September 2009 16:46:30 UTC