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

On Mon, Sep 28, 2009 at 10:43 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Mon, Sep 28, 2009 at 12:27 PM, Brad Kemper <brad.kemper@gmail.com>
> wrote:
> > I don't see the need to be slavishly consistent with how backgrounds
> tile,
> > just because of the re-use of the same keyword. Is there any other
> > advantage, other than just "that's closer to how background tiling
> works"?
> > Or are you saying there is some advantage because you could get the
> > background-image tiles to line up with the border-image tiles?
>
> That is indeed the major advantage I was thinking of.  You can just
> set the background to 50% and tile it, and it'll automatically match.
> Plus, hey, clustering as many copies as will fit into the center is
> still a nice visual effect, distinct from what you get by distributing
> the space.
>

OK, as long as there is a way to distribute too, as I think that would be a
far more common desired effect that having all the tiles brunched together
with space on the sides of the whole run..

>>> 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.
> >>
> >> Actually, the current wording makes sense, since the tiling doesn't
> >> occur until later.  'stretch' could conceivably be left-aligned (it
> >> doesn't matter at all), but 'round' *would* produce a different visual
> >> effect if the image was centered before tiling - what if you had an
> >> even number of copies?
> >
> > I don't know what you mean. In what space is the image centered before
> > tiling? Doesn't "round" cause the image to be resized in one dimension
> until
> > it fits perfectly and leaves no left over space? How does odd or even
> number
> > matter? Am I completely misunderstanding what "round" is supposed to do?
>
> It's centered in the border-image area, and then drawn/tiled in the
> step after that.  So, if you have a 200px wide box, and a 120px wide
> image, round will downscale it to 100px wide.  How it is supposed to
> work if you then center the 100px-wide image before tiling it?  You'd
> only have 50px to either side.
>

I'm sorry, but that still doesn't make any sense to me.

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?



> (If you center the group of tiled images, it of course works, because
> there's nothing to center - the group fills the space perfectly by
> design.  But that's not how the algorithm works.)
>

Isn't the whole purpose of "round" to make the group fit perfectly?

Received on Monday, 28 September 2009 20:39:47 UTC