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

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 Sunday, 27 September 2009 05:28:17 UTC